polymorfa

package module
v0.1.0-preview.2026112... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 47 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Polymorfa Go SDK

Handwritten server SDK for Go 1.24 or newer. This source checkout is under development and has not been published. The primary ledger records 445 covered operations; mapping, native execution, package verification and deployed availability are separate evidence.

The module import is github.com/polymorfa/sdks/packages/go. This corrects the proposed github.com/polymorfa/sdks/go name to match the actual repository subdirectory. A release from this layout needs a packages/go/vX.Y.Z tag. Do not advertise an installation version until that version exists. For local work, use the replace directive in examples/go/send-message/go.mod.

client, err := polymorfa.NewMessagingClient(polymorfa.Config{
    Credential: polymorfa.Credential{
        Kind: polymorfa.TeamAPIKey,
        Value: os.Getenv("POLYMORFA_API_KEY"),
    },
})

NewTeamClient accepts a team key. NewProjectClient accepts a team key or a project token with an explicit project ID. team.Project(id) returns a separate view; project tokens cannot rebind to another project. NewMessagingClient additionally accepts a scoped client token, with server-only operations rejected before a request. Credential formatting redacts token values. NewSystemClient sends no credentials. NewBridgeClient accepts only project tokens for regional route discovery.

Pass context.Context to each request. Each Response[T] includes typed data and safe response metadata. Developer resources unwrap documented data envelopes; Messaging resources retain their native success envelope. Errors expose semantic kind, API code, request ID and metadata through errors.As(err, &apiError). API codes remain open strings so new server errors do not break decoding.

RequestOptions controls version, timeout, retries, headers and idempotency. Safe requests retry network failures and retryable status codes; writes retry only with an idempotency key. Message send, reaction and other documented idempotent helpers create a key once per invocation. Application-level retries must reuse the application's own key. Replayed responses and responses carrying an operation ID are final. Failed response-body reads retain operation metadata; query the operation before retrying an admitted effect. Call link, reaction and socket commands use their documented retry restrictions. Authenticated plaintext URLs are allowed only for loopback servers.

CursorPage[T] loads the first page and follows cursors lazily through All(ctx) or NextPage(ctx). Developer event streams expose typed frames, resume cursors, gaps, reconnect callbacks and manual acknowledgements. Raw provides an explicit JSON escape hatch; a project view confines raw paths and credentials to its project.

RequestLogs().List reads typed project request-log pages and retains nullable status, durations and removed credentials. Follow advances the follow cursor; Tail yields backfill chronologically and follows new requests, with bounded rate-limit waits and context cancellation. Team callers select a project; project views reject foreign selections. API logs:read permission still applies. Events().LiveSource adapts retained webhook bodies to cancellable subscriptions. It skips events without retained payloads, passes their resume cursor to the listener, reports terminal errors, and closes its reader before Done completes.

ConstructWebhookEvent verifies HMAC against exact raw bytes before parsing. TypedPayload exposes all 84 known event names through a closed interface with concrete payload types. Unknown event names and payloads survive decoding. Separate helpers verify local-forward and Flow-forward signatures with their timestamp rules. Native webhooks do not include timestamp replay protection. WebhookHandler integrates with net/http, enforces POST and a body bound, and verifies X-Webhook-Signature before invoking the application. Applications must handle duplicate deliveries according to their own persistence model.

Media downloads expose bytes or an io.ReadCloser, filenames and API metadata. The configured timeout covers response headers, storage redirects and the complete media body; closing the body cancels its request. Cancellation and timeout remain errors even when the transport ends its body with EOF. Reads after a successful EOF continue to return EOF. API base paths are preserved for HTTP requests and Calls sockets. Signed download URLs redact routine Go formatting. Storage redirects receive no bearer credential, caller headers or cookie jar. WhatsApp media helpers parse supported descriptors, enforce HTTPS CDN hosts and size limits, derive HKDF keys, verify the ten-byte MAC and hashes, then decrypt AES-CBC before releasing bytes. VerifyBeforeRelease buffers plaintext until integrity checks pass. VerifyStreaming releases plaintext incrementally and reports final integrity failures through the reader; discard the output if the final read fails. File helpers write private sibling files and install them only after successful verification. API file helpers also enforce byte limits and preserve existing destinations on failure.

Calls use the native github.com/coder/websocket implementation. Lifecycle and media sockets send authentication as the first WebSocket message, never in the URL. Follow maintains the lifecycle connection, tracks incoming and outgoing calls, buffers events that precede REST admission, and reconnects with bounded backoff. Call exposes answering, joining, leaving, ending, PCM audio, H.264 video, confirmed media preferences, participants, reactions and hand state. Media reconnect keeps the same connection identity and restores confirmed preferences. An optional token provider shares refresh work and refreshes socket authentication before expiry. Quality/error reporters bound diagnostic traffic and stop on permanent refusal. Consume lifecycle and call events with a select on Done(); event channels remain open during concurrent cleanup.

Verification and protocol evidence

Run go test ./... and go vet ./... from this directory. The tests execute native HTTP fixtures and a shared Node wire server. Run go test ./... in each examples/go/* directory to compile the consumer examples without network effects. send-message requires POLYMORFA_API_KEY, POLYMORFA_CONNECTION and POLYMORFA_PHONE and sends a message when run. calls-agent requires the API key and connection and answers incoming calls when run. webhook-server requires POLYMORFA_WEBHOOK_SECRET and listens on loopback port 8080.

web-host runs a Gin or net/http application with templ, HTMX and the existing Web Components. Its app-owned POST token endpoint derives the number and user from authenticated server state. The example has native HTTP tests for both hosts and a browser-tested sign-in, inbox mount and sign-out flow.

WhatsApp media behavior was checked against TypeScript SDK source and Cellar's shipped-client bundle whatsapp-1049950004:

  • /Users/purpshell/.cellar/bundles/whatsapp-1049950004/modules/WAWebCryptoCreateMediaKeys.js:23-29: HKDF expansion to 112 bytes and IV/encryption/MAC/reference key slices.
  • /Users/purpshell/.cellar/bundles/whatsapp-1049950004/modules/WAWebCryptoDecryptMedia.js:19: ten-byte MAC; lines 28-39: HMAC over IV and ciphertext, truncated comparison; lines 41-50: CBC decryption; lines 57-60: plaintext hash verification.

This is shipped-client protocol evidence, not proof of a current server or live-provider download. No live API credentials, real WhatsApp media, registry release or deployment were exercised.

write_coverage.py reconciles manually authored public-method wire fixtures with the pinned ledger. It emits coverage metadata only; SDK resources and types are handwritten. Operations remain missing until both the typed method and its request/response fixture pass. Direct-media/history and customer-owned storage consumers record their separate source pins below; the primary API default remains 2026-09-22.

The neutral Calls media interface is Call.WriteAudio, Call.WriteVideo and Call.Events. Audio events contain signed 16-bit PCM at Call.Snapshot().SampleRate. Video events retain H.264 bytes, source handle, microsecond timestamp and keyframe flag; video_source, video_source_removed and keyframe_request controls reach the same event channel. Snapshot().VideoSources provides typed owners and labels and clears on media disconnection or call end. Outgoing video uses source zero. Applications provide their own capture, codecs and playback; these server interfaces do not create browser media devices. The actual WebSocket tests cover PCM/H.264 framing and source/keyframe controls.

Campaign follow-ups (beta)

Both campaign surfaces accept CampaignFollowUp on create and update. A nil FollowUp request field omits the setting; &Nullable[CampaignFollowUp]{} sends null to remove it from an unlaunched draft. Use CampaignFollowUpTextMessage{Text: ...} or CampaignFollowUpTemplateMessage{TemplateID: ...}. Each variant supplies its own discriminator; a nil message is rejected before transport.

followUp := polymorfa.CampaignFollowUp{
    Message: polymorfa.CampaignFollowUpTextMessage{Text: "Hi {{first_name}}, still interested?"},
}
_, err := client.Campaigns().Update(ctx, projectSlug, campaignID, polymorfa.UpdateCampaignRequest{
    FollowUp: &polymorfa.Nullable[polymorfa.CampaignFollowUp]{Value: &followUp},
})

The first delivery starts the delay; the first read restarts it before sending starts. Replies and opt-outs cancel the follow-up, and expired waits never send. DelaySeconds accepts 60 through 604800 and defaults at the API to 86400. ExpirySeconds accepts 86400 through 2592000, defaults to 604800, and must exceed the delay. Expiry starts at the first send. Returned timing fields remain optional. A campaign must send a single first message; follow-up text cannot contain tracked links. The API enforces beta enrollment and returns 403 feature_unavailable when the team is not enrolled.

CampaignRecipient.FollowUp retains typed status, receipt anchor, due/expiry times and reason. CampaignAnalytics.FollowUps is required on both surfaces. CampaignFollowUpReport counts these outcomes separately from the first message. Follow-up timestamps are Unix milliseconds. Native fixture verification covers the merged contract; no live follow-up campaign or publication was exercised.

Contact frequency caps, audience segments and drips (beta)

These methods follow contracts/campaign-frequency-cap.json and contracts/campaign-segments-drip.json. They do not enroll a team in a beta; the API returns 403 feature_unavailable when a team lacks access.

The team cap is a team setting. Campaigns().GetFrequencyCap(ctx) returns both limits, Revision and UpdatedAt (nil until first saved). UpdateFrequencyCap replaces both windows with the revision you read; nil limits remove them. The PUT is sent once. A stale revision returns a ConflictError; read again and reconcile. Campaign create and update accept FrequencyCap (&Nullable[CampaignFrequencyCap]{} removes a campaign cap), recipients report CampaignFailureFrequencyCap, and analytics add FrequencyCap.SkippedRecipientCount.

TeamClient.AudienceSegments() lists, retrieves, creates, updates and deletes saved segments, and previews a saved segment or unsaved rules. A project client has no segment methods. Build rules from typed conditions such as AudienceSegmentTagContains and AudienceSegmentAttributeCompare; conditions the SDK does not model decode as AudienceSegmentUnknownCondition and are rejected in requests. Updates and deletes need the last observed revision. Writes and both previews are sent once; a 409 state_conflict means a stale revision or an evaluation timeout, so re-read or simplify the rules.

Platform create accepts SegmentID (omit it rather than sending null) and update accepts SegmentID: &Nullable[string]{} to clear it. Drip takes a CampaignDripInput on create and a partial CampaignDripPatch on update; the SDK applies no defaults, and omitted fields keep their stored values. Drip steps accept DelayUnit and a per-step SendWindow. Ordinary creates allow DelayAfterSec up to 86400; drip creates and every PATCH allow up to 2592000, and the API checks the stored drip, delay unit and eligibility. Campaigns().Enroll and MessagingCampaigns.Enroll add a contact to a continuous drip and are never retried automatically. Campaign reads expose Drip, EnrollmentOpen, PauseReason, SegmentID and SegmentSnapshot; analytics expose per-step Drip results.

Raw pagination

PaginateRaw[T] accepts any SDK client with a Raw method and a decoder that receives the JSON body and response metadata. Return PageResult[T] with items and the next cursor; an empty cursor ends pagination. RawPaginationOptions changes the cursor query key from cursor to the API's key. NextPage(ctx) loads one more page, and All(ctx) iterates lazily. Cancellation, request options and project confinement apply to every page. Repeated cursors fail with invalid_response. Query parameters and headers are copied before loading.

page, err := polymorfa.PaginateRaw(ctx, project, polymorfa.RawRequest{
    Method: "GET", Path: "/events",
}, func(body json.RawMessage, metadata polymorfa.Metadata) (polymorfa.PageResult[polymorfa.PlatformEvent], error) {
    var wire struct {
        Data []polymorfa.PlatformEvent `json:"data"`
        Page struct { NextCursor string `json:"nextCursor"` } `json:"page"`
    }
    if err := json.Unmarshal(body, &wire); err != nil { return polymorfa.PageResult[polymorfa.PlatformEvent]{}, err }
    return polymorfa.PageResult[polymorfa.PlatformEvent]{Items: wire.Data, NextCursor: wire.Page.NextCursor}, nil
})

Use the typed resource method when it represents the endpoint. Raw decoders are application-owned; validate the endpoint's response shape before returning items. The follow-up union replaces the unpublished CampaignFollowUpMessage struct. Use the text or template variant when upgrading a source checkout. Follow-up business constraints and enrollment remain enforced by the API.

Local upload encryption

EncryptWhatsAppMedia encrypts a byte slice. EncryptWhatsAppMediaTo reads an io.Reader incrementally and writes encrypted bytes to an io.Writer with bounded working memory. Choose UploadImage, UploadVideo, UploadAudio, UploadVoiceNote, UploadDocument or UploadSticker; a 32-byte media key is created with the operating system random source unless you supply one for an immutable repeat pass. Plaintext defaults to a 256 MiB limit.

media, err := polymorfa.EncryptWhatsAppMedia(ctx, plaintext, polymorfa.EncryptMediaOptions{
    MediaType: polymorfa.UploadImage,
    MimeType: "image/jpeg",
})
if err != nil { return err }
// media.Ciphertext is ciphertext plus its ten-byte MAC. Keep MediaKey private.

For a repeat pass, supply the first pass's MediaKey in EncryptMediaOptions and its EncryptedMediaInfo as the final argument to EncryptWhatsAppMediaTo. The source must reach EOF and match both hashes and lengths before the final ciphertext block and MAC are released. Changed sources, cancellation, missing EOF, read/write failures and size overruns fail without a complete upload body. The caller owns and closes the reader/writer and must discard partial output on failure. This helper performs local encryption; it does not finalize a CDN upload or send a message. Formatting and JSON serialization omit the media key and ciphertext. Independently calculated vectors and repeat-pass failure tests cover all six media kinds.

Encrypted upload egress

MessagingClient.WhatsAppMedia().UploadBytes() uploads a byte slice; Upload() accepts a WhatsAppMediaSource factory returning a fresh io.ReadCloser of the same plaintext on every call. The SDK closes each returned stream. A hashing pass obtains the encrypted hash before the upload pass; changed sources fail before a complete encrypted body or document finalization is released.

UploadWhatsAppMediaOptions.Egress defaults to relay: the API receives ciphertext plus its MAC and forwards it through the connection's connection. direct requests a short-lived grant and uploads from your process. Neither upload mode sends plaintext or the media key to an upload endpoint. Keep the returned MediaKey and location private.

Direct uploads preserve the exact grant token and upload parameters, refresh a 401 grant, resume interrupted ordinary uploads, and retry network errors, 408 and server errors except 507. Redirects are refused. Document uploads above 50 MiB use consecutive parts and finalize only after the source's EOF/hash check. Part size is configurable from 1 byte to 64 MiB; the SDK buffers one part for repeatable retries. API credentials, cookies and caller headers are excluded from CDN requests. The direct network operation's timeout covers requests and response bodies; the caller's context also cancels source reads. A cancellation or timeout does not undo a provider upload that already ran.

CreateUploadGrant() and RelayUpload() are also available for applications that supply their own encrypted-body factory. Applications using these lower level methods own source immutability and integrity checks. Upload methods select API version 2026-10-14 per request by default; existing SDK methods retain their 2026-09-22 default. The additive API must be enabled and available in the selected environment; a source checkout does not establish that access.

Sending uploaded media

ToWhatsAppMediaSendDescriptor(upload) converts an encrypted upload result to a validated descriptor. Set MediaContent.Descriptor for image, video, file or voice messages, or StickerContent.Descriptor for a sticker. Voice notes also set MediaContent.PTT to true. Optional WhatsAppMediaSendMetadata carries a thumbnail, dimensions, duration, waveform, key timestamp or sticker animation. Descriptors cannot be combined with URL/base64/MIME inputs; stickers require image/webp. Keys and hashes use binary slices locally and standard base64 on the wire. Returned descriptors remain typed and redact ordinary formatting and JSON; Wire() explicitly exposes secret fields.

Descriptor message sends select API revision 2026-10-14 unless overridden; ordinary sends keep the legacy default. A standard message send transmits its media key to Polymorfa. Applications requiring customer key custody send through their application sidecar instead. Keep descriptors and explicit wire maps out of logs and error details.

Local history chunks

DownloadHistoryChunk(ctx, input, options) accepts either a HistorySyncChunkDescriptor or compressed InlinePayload. Descriptor downloads use the WhatsApp History HKDF label and verify the encrypted hash, MAC, compressed hash and optional length before decompression or a decoder callback. No Polymorfa credential reaches the CDN. Compressed input defaults to a 256 MiB bound and inflated data to 512 MiB; configure smaller limits for your process. Gzip, zlib and raw deflate are accepted. Truncated data, trailing bytes, malformed wire fields and size overruns fail. Context cancellation covers network bodies, inflation steps and decoder admission.

HistorySyncData.Protobuf preserves the exact inflated proto2 message. Fields retains every wire field, including unknown fields and groups. Conversations exposes chat IDs, message protobuf and unsigned message order IDs; SyncType, ChunkOrder and Progress expose core metadata. This handwritten view does not replace the full WhatsApp schema. Supply DecodeHistorySyncOptions.Decoder for your complete proto2 model; it receives a private verified copy, while the original bytes remain available. Formatting and ordinary JSON redact content. No decode helper stores data, acknowledges events or deletes chunks.

MessagingClient.HistorySync().RequestChunkRetry() requests another chunk from the phone; DeleteChunk() explicitly deletes a processed CDN blob. Store the chunk durably before deletion. Both commands require a server credential and select API revision 2026-10-14 by default. The API enforces connection authority, consent and availability. Delete requests accept binary SHA-256 and encode it as standard padded base64. Neither command retries automatically; timeouts and cancellation do not undo an accepted request.

Customer-hosted D1 binding

Import github.com/polymorfa/sdks/packages/go/storage for the storage-only Adapter interface, schema-3 definitions/key encoding and NewD1Adapter(). Provide your Worker URL, immutable authority and table prefix, and a separate application secret. HTTPS is required except on loopback. The constructor verifies a fresh signed handshake before exposing atomic commit capability; a zero-value adapter exposes no capability. It supports setup only when the Worker permits it, bounded get/query, and all-or-none conditional commits.

Every request signs its fresh nonce, method, exact path and exact body. Every response must authenticate that nonce, status and exact body and match the configured authority/prefix/schema. Foreign rows, scope/order violations and unrelated conflict IDs fail closed. Redirects and automatic retries are refused; operation deadlines cover response bodies. Unconditional deletes require a same-connection CAS lease write in the same atomic batch. Secrets and endpoint URLs are omitted from errors and ordinary formatting/JSON.

This uses the customer Worker bridge pinned at d80b581c9df122411e9149a7e39a33700a51571c, backed by the D1 Worker binding. Administrative D1 REST is not an atomic adapter. Native tests exercised the actual bundled Worker/Miniflare binding with all-entity fixtures, 2,000-row pagination, rollback, fenced deletion and checkpoint CAS. Set POLYMORFA_D1_BRIDGE_FIXTURE_URL to repeat that opt-in proof. The adapter persists rows only; the shared engine below owns reducers and merge/replay policy. Provider adapters and their native proofs are listed below.

Customer-owned Signal service client

The server-side sidecar client consumes the application HTTP contract pinned to 61209057729b002a2122b898d744a8813a702fc7. The separate application bearer secret is not a Polymorfa API credential: it needs at least 16 visible ASCII characters, and values starting with the reserved pmfa_ prefix are rejected before any request or webhook HMAC check. Device keys remain with the customer-operated Signal service; the SDK imports no Signal core and uses no FFI. Require HTTPS except on loopback. Redirects, credential cookies and automatic retries are refused. Request deadlines and caller cancellation do not undo a send or ACK.

Create NewSignalSidecarClient(SignalSidecarOptions{URL: serviceURL, Secret: applicationSecret}). Use Health, Connections, Send with SignalSendRequest, and OpenEvents(ctx, connectionID). Iterate stream.Items() and close the stream. ToSignalMediaDescriptor(upload) converts a completed local media upload into a secret-bearing send descriptor, including PTT audio.

An SSE connection delivers each record immediately and validates its ID, event type and requested connection. The SDK retains exact JSON and protobuf bytes, including unknown fields; history notification enums remain nullable integers. There is no cursor, automatic reconnection or automatic ACK. Durably persist an event and its effects before calling Acknowledge.

VerifySignalWebhook verifies the timestamp window and HMAC of the exact raw body. ProcessSignalWebhook requires a SignalWebhookStore.ApplyOnce implementation that atomically deduplicates and durably commits effects. Return HTTP 2xx only after it succeeds. No in-memory deduplication fallback is supplied. Ordinary formatting and JSON serialization redact secret-bearing DTOs; explicit raw bytes and wire conversion are customer-owned sensitive data and must not be logged.

Native tests cover HTTP, streaming cancellation, redirects, header isolation, nullable history, raw protobuf and independent webhook HMAC vectors. The opt-in POLYMORFA_SIGNAL_FIXTURE_DIRECTORY proof exercised the pinned service and real core with synthetic pairing, encrypted receive, caller fsync before manual ACK, and sends through a fake upstream WebSocket. This proves those local boundaries; it does not establish live WhatsApp pairing, provider delivery or peer decryption.

Schema2 storage engine and local history reduction

storage.NewEngine(adapter, storage.EngineOptions{}) adds the shared deterministic merge, deduplication and checkpoint policy to a storage-only adapter. The process-local storage.NewMemoryAdapter(500) is available for tests and ephemeral applications; use a durable adapter for restart recovery. Applications own data, connections, namespaces and retention. The SDK does not send stored content to a hosted database or log row contents.

Apply accepts a storage.Batch with typed field writes and operation kinds. Each field uses its version and a deterministic value tie-breaker, including UTF-16 ordering and ECMAScript canonical number spellings. Revoked content and media references use a final version so older history cannot restore them. Every payload chunk reserves one slot for the durable connection lease CAS. Lease release advances its revision rather than deleting it. Between bounded planning reads and clear-query pages, the engine conditionally renews a lease at half its TTL. An expired or replaced lease still fails before data or the event marker can commit. A failed chunk stops later writes, including the event marker, even when no conflict IDs are returned. Retries re-read and re-plan; a large event can partially commit and is recovered by replay before the final deduplication marker appears.

ReduceEvent covers the listed WhatsApp chat-data events and excludes calls, campaigns, billing and presence from chat storage. ReduceHistoryChunk consumes complete decoded protocol JSON, with scoped chat/direction/participant identity and device-JID normalization. ReduceHistoryData requires the local history codec's explicit complete-schema decoder result; the minimal built-in protobuf view is insufficient and fails closed. Retain the codec's exact raw protobuf when unknown fields must remain available. Local history decoding and reduction never enable service history consent.

engine.ApplyEvent accepts a verified webhook and an optional local history decoder. SyncToStorage(ctx, storage.APIEventSource{Events: project.Events()}, engine, options) resumes from the saved cursor and orders event commit, checkpoint CAS, then manual ACK. A retention gap or missing required payload stops consumption before checkpoint or ACK. ExpectedCursor == nil means no cursor assertion; &storage.ExpectedCursor{} explicitly requires no saved cursor. Callers cancel the context to stop the consumer.

Native race tests cover both shared portable event/history fixtures, 2,000-message history, replay, concurrent engines, atomic rollback, permanent revocation, clear-chat media/child deletion, equal/late watermarks, first-failed-chunk refusal, checkpoint CAS and actual API HTTP/SSE persistence-before-ACK. The opt-in D1 proof runs the same engine over the signed actual Worker/Miniflare binding; administrative D1 REST is never treated as atomic.

PostgreSQL, MySQL and SQLite

storage.NewSQLAdapter(ctx, db, storage.PostgreSQL, options) accepts a configured *sql.DB using pgx's standard driver; use storage.MySQL with go-sql-driver/mysql or storage.SQLite with modernc SQLite. Connections remain borrowed unless OwnsClient is selected. Use a trusted TablePrefix and optional PostgreSQL Schema for independent application namespaces. The exported SQLSchemaStatements and SQLMigration use the shared schema3 column names and indexes. PostgreSQL clients include customer-operated Supabase and Neon SQL connections; MySQL clients include compatible customer PlanetScale connections. Their actual cloud hosting and credentials were not exercised by local tests.

Setup creates schema3 tables unless CreateTables is explicitly false. It never rewrites a different saved version. Reads and writes verify that version and fail closed on mismatch. MySQL also requires InnoDB for every storage table and strict SQL mode before atomic commits are exposed. Conditional writes execute in one native transaction; stale revisions roll the entire batch back. An unconditional delete requires a matching connection lease CAS in that same batch. Errors omit database URLs, credentials and upstream exception text.

Native tests use pgx with PostgreSQL 16, go-sql-driver/mysql with MySQL 8.4 and modernc SQLite. Each runs shared event/history fixtures, 2,000-message history, pagination, rollback, lease/checkpoint behavior and schema-version refusal. They verify borrowed/owned close behavior and reject nontransactional MySQL. Set POLYMORFA_SQL_FIXTURE_METADATA to a task-owned metadata file containing postgres and mysql test DSNs to repeat the optional server proofs. The provider and ORM adapters below reuse this SQL contract.

storage.NewLibSQLAdapter(ctx, db, options) accepts an application-configured github.com/tursodatabase/libsql-client-go/libsql pool and uses the same schema3 SQL contract. The official HTTP client pinned at v0.0.0-20260528064733-9d5d30a29a60 passed the complete native SQL conformance suite against an actual libSQL server, including conditional rollback and 2,000-row paging. Set POLYMORFA_LIBSQL_FIXTURE_URL to repeat that opt-in proof.

The official driver controls transport timeouts. Its commit/rollback methods use their own context; caller cancellation does not promise to interrupt an in-flight commit. The adapter waits for the native transaction to settle before returning or closing an owned pool, and never changes global HTTP settings. A cancelled or failed operation can have an uncertain committed outcome; replay from the durable checkpoint and deduplication marker rather than assuming undo.

Customer-owned document databases and ORM exports

All adapters borrow caller-configured official clients and use a trusted storage.ProviderOptions.Namespace. Set Create only when this application may initialize its schema3 version marker; setup refuses a different saved version. MaxQueryRows bounds indexed reads before local ordering and pagination. The engine supplies conditional revisions and reserves one commit slot for its same-transaction lease. Adapters never evaluate webhook policy or store device keys.

Adapter Client verified by native tests Atomic batch limit
NewMongoAdapter(ctx, database, options) go.mongodb.org/mongo-driver/v2 2.8.2, MongoDB 7 replica set 500
NewDynamoAdapter(ctx, client, DynamoOptions{ProviderOptions: options, TableName: table}) AWS SDK v2 DynamoDB 1.70.3, DynamoDB Local 100
NewFirestoreAdapter(ctx, client, options) cloud.google.com/go/firestore 1.21.0, Firestore emulator 250
NewCosmosAdapter(ctx, container, options) Azure azcosmos 1.4.2, Cosmos vNext emulator 100

MongoDB requires a replica set and native snapshot/majority transactions. DynamoDB verifies an active table with string pk hash and sk range keys. Firestore reads all conditional rows before issuing writes in its native transaction. Cosmos requires exactly the /namespace partition key and retains ETag-guarded tombstones so a logical delete cannot race with recreation. Its physical document IDs must fit the provider's 1,023-byte limit.

MongoDB and Firestore keep raw schema3 rows, with exact encoded keys as document IDs. DynamoDB uses {pk: namespace+":"+entity, sk: encodedKey, row}. Cosmos uses {id: entity+":"+encodedKey, namespace, entity, row, deleted} in one customer partition. These layouts match the shared TypeScript storage contract. Provider errors omit credentials, URLs and upstream diagnostic bodies.

Clients remain borrowed by default. MongoDB, DynamoDB and Firestore support OwnsClient; closing an owned adapter waits for active adapter operations. Cosmos rejects OwnsClient because its container client exposes no close boundary. Neither adapter changes global transport configuration. Context cancellation and provider deadlines do not establish that an accepted write was undone; recover with checkpoint and event replay.

SupabaseSchema(SupabaseOptions{...}) exports customer-installed PostgreSQL schema and FORCE RLS policies. A distinct server role writes; browser readers see only connections with live auth.uid() membership and receive no write grant. The preset never installs itself or grants a browser server credentials. Actual restricted PostgreSQL roles verified live revocation and browser write refusal; hosted Supabase and Neon services were not exercised.

GORMModels(dialect, sqlOptions) exports table names and schema-derived model values for customer-owned GORM migrations and reads. Pass each value to db.Table(model.Table).AutoMigrate(model.Value), then initialize the version marker with SQLMigration or NewSQLAdapter. Persist synchronized data through the shared engine; ORM models do not replace revision, watermark or lease policy. The official GORM 1.31.1/PostgreSQL driver 1.6.0 passed actual PostgreSQL migration, engine-write and ORM-read interoperability checks.

Opt-in native tests use POLYMORFA_MONGO_FIXTURE_URI, POLYMORFA_DYNAMO_FIXTURE_METADATA, POLYMORFA_FIRESTORE_FIXTURE_HOST and POLYMORFA_COSMOS_FIXTURE_METADATA. They exercise the portable all-entity event and history fixtures, 2,000-message history, bounded paging, replay, atomic rollback, lease-fenced deletion, checkpoint CAS and namespace isolation against actual drivers. These emulator/local-server proofs do not establish cloud account permissions, hosting availability or deployment readiness. Convex and IndexedDB are outside the accepted Go adapter matrix.

S3-compatible media storage

NewS3MediaStore(S3MediaStoreOptions{Client: client, Bucket: bucket, Prefix: prefix}) borrows an official AWS SDK v2 S3 client configured for the customer's bucket, including compatible R2 or MinIO endpoints. UploadToWhatsApp takes a Messaging media resource, connection, relative key and the existing encrypted upload options. It requires an object ETag, pins both reads with If-Match, and preserves the source-length and final encrypted-hash barriers before provider finalization. An object changed between reads fails instead of finalizing mismatched media.

Archive(ctx, descriptor, S3ArchiveOptions{Key: key, ScratchDirectory: privateDir}) snapshots the descriptor, downloads and verifies into a private file, checks its known plaintext length, then starts the object PUT. Corruption, wrong length or pre-PUT cancellation cannot start an overwrite. Cancellation during an admitted PUT cannot guarantee rollback. Each private spool is removed after success or failure. Optional metadata is bounded ASCII; the SDK adds media kind, plaintext hash and encoded filename, and never writes the media key. Caller metadata must not contain secrets.

The official S3 client 1.114.3 passed actual MinIO proofs for relay/direct upload, both conditional reads, changed-source 412 refusal, verified archive, descriptor mutation isolation, corrupt-source overwrite refusal, known-length mismatch, cancellation and spool cleanup. Repeat with task-owned synthetic metadata in POLYMORFA_S3_FIXTURE_METADATA. AWS and R2 account credentials, provider hosting and live WhatsApp delivery were not exercised by these native tests.

UploadWhatsAppMediaOptions.UploadTransport accepts a customer WhatsAppMediaUploadTransport instead of an Egress string. Its Name() identifies the result; Upload(ctx, connection, body) receives encrypted-body metadata and body.Open(ctx, offset), without plaintext, the media key or API credentials. Each opening revalidates the immutable plaintext source before releasing final encrypted bytes. The SDK rejects success if no complete verified encrypted body was consumed and closes all outstanding streams when the callback returns. Custom callback failures become safe SDK errors; cancellation stops owned streams.

client.WhatsAppMedia().UploadTransport("relay", options) and its "direct" variant return reusable built-ins that a customer transport can wrap. Existing grant, credential isolation, retry/resume and finalization rules remain in those built-ins. Native TCP tests exercise custom encrypted wire bytes and offsets, wrapped relay/direct uploads, changed-source refusal, incomplete consumption, blocked-source cancellation, error redaction and refusal to reopen a completed body. A customer transport owns its external endpoint and must finalize the destination only after its encrypted-body read succeeds.

Additional campaign and custody contracts (development source)

This checkout adds 30 handwritten operations from API source 15db8b1c9d88e2ceccb58c851e731feabb659a39, using TypeScript reference 44d5426f90bf376940a5198edac5da4cd893cbe9. The additive contract remains unpublished. The primary coverage snapshots and global API default stay at their existing revisions. These methods select 2026-10-14 per request when RequestOptions.APIVersion is empty; an explicit request version takes precedence. An SDK method does not establish deployed beta access or package availability.

MessagingClient.Campaigns() adds GetReplyFlow, CreateReplyFlow, SetReplyFlow, TestSend, Links and ExportRecipients, using a project slug. All six require a team key or project token; client tokens fail before HTTP. The API still checks live scopes, project ownership, feature access, funding and sender eligibility. Test sends require both campaign read and manage scopes and send real messages.

team.Campaigns() exposes the corresponding Platform methods plus ListLaunchApprovals and team-only GetSettings. Its project selection belongs in the typed query or request body. team.Project(projectID).Campaigns() and a project-token client's Campaigns() expose only the seven confined operations. They retain their project privately and accept no caller project selector. Creating another project view does not retarget an existing resource.

Reply flows use CampaignReplyFlowDefinition, named nodes and edges, and sealed message variants CampaignReplyText, CampaignReplyButtons, CampaignReplyList and CampaignReplyFlowForm. Match variants are CampaignReplyChoice, CampaignReplyKeyword and CampaignReplySubmission. Each variant supplies its own discriminator. The SDK checks structural and byte limits; the API owns graph semantics, compliance and campaign state. SetCampaignReplyFlowRequest{} sends required replyFlowId:null to detach; a non-null Nullable[string].Value attaches.

team.AudienceProfiles() adds List, Retrieve, Put, Delete and ListConsent; its Imports() resource adds Create, Retrieve and Cancel. These team-wide resources are absent from project clients. Profiles are customer-supplied campaign data, independent of WhatsApp-synchronized contacts. Put replaces tags and attributes: provide non-nil collections, including []string{} and an empty map. A nil ExpectedRevision omits it when creating; replacement uses the observed positive revision. AudienceProfileAttribute{} is explicit null; a non-null Value uses exactly one string, finite-number or boolean CampaignVariable variant. Consent Allowed:false and AssertedAt:0 remain explicit values; consent assertions never override an opt-out or grant permission to send.

Imports send JSON containing ReplayKey, canonical padded standard-base64 UTF-8 CSV and optional named column mapping. They accept at most 10 MiB of decoded CSV; invalid rows and revision conflicts remain visible in the returned job report. Aborting an HTTP waiter does not cancel a job; call Imports().Cancel explicitly. Committed rows remain after cancellation. Audiences().CreateFromCampaign creates a team audience from an explicit outcome and optional source-project selector.

OptOuts() adds GetConfirmationSettings, UpdateConfirmationSettings and GetConfirmationSummary. These confirmation settings are separate from keyword capture. The update requires the exact team and revision; false, zero and a null locale remain explicit. Enabling requires a supported non-null locale.

project.SignalCustody() adds Retrieve, Update, RetrieveCustomer and UpdateCustomer. Team aliases live on Projects() and Customers(). These defaults apply to future Connection reservations and never convert existing Connections. Project mode cannot be null. Customer null restores inheritance:

project, err := team.Project(projectID)
if err != nil {
    return err
}
observed, err := project.SignalCustody().RetrieveCustomer(ctx, customerID)
if err != nil {
    return err
}
_, err = project.SignalCustody().UpdateCustomer(ctx, customerID,
    polymorfa.CustomerSignalCustodyUpdate{
        ExpectedRevision: observed.Data.Data.Revision,
        SignalModeDefault: polymorfa.Nullable[polymorfa.SignalCustodyMode]{},
    })

Keep revision conflicts visible: reload and reconcile rather than silently retry with a new revision. Required nullable values use a Nullable[T] value; optional nullable fields elsewhere use a pointer to it. A zero revision is valid for custody defaults and stays in JSON. New typed success models check required fields and scalar shapes while tolerating response extensions. Optional nonnullable fields accept omission and reject explicit JSON null. Reply keyword requests retain the 64-byte UTF-8 bound; returned keywords preserve the API's lowercase form, including Unicode expansions within its 64 UTF-16-unit response bound.

New writes default to no automatic retry, except TestSend, which captures one idempotency key and body for its retries. Preserve an explicit caller key across an uncertain result. IdempotencyKey takes precedence over Headers; a single Idempotency-Key header is recognized regardless of casing. Conflicting or multivalued caller keys are rejected before HTTP. A completed replay returns the API's conflict; an unknown outcome does not prove no message was sent. An explicit retry override on other writes has no declared replay guarantee. A profile-import body replay key is separate from an HTTP idempotency key.

ExportRecipients returns one finite CampaignRecipientExportPage, preserving server CSV quoting, CRLF, optional next cursor and sanitized filename. It requires HTTP 200 with text/csv and rejects redirects. With a status or reason filter, omit cursor and use limit 1000 or omit it. Unfiltered pages are separate reads, not a global snapshot. Cancellation closes the response; no next page is fetched automatically. Request metadata retains the request ID, trace ID, replay header, retry advice and content disposition. Native fixtures exercise these contracts; live campaign sends, import processing, custody availability and publication remain separate acceptance gates.

Campaign and descriptor delivery contracts

Campaign requests use CampaignVariableMapping and CampaignTrackedLinks. A nil create mapping omits it. PATCH uses *Nullable[CampaignVariableMapping] and *Nullable[string] for mapping and template resets. A nil field omits the change; an empty Nullable sends null. Empty mappings encode {}, and an empty CampaignTrackedLinks value encodes []. Numeric and __proto__ mapping keys are valid. Bounds count UTF-16 units. Follow-up defaults participate in the expiry-greater-than-delay check before HTTP.

Platform MessagesArray uses open CampaignComposedMessage, media and button models. Extra retains extension fields. Empty composed messages are valid. Platform PATCH remains open and accepts empty updates. Messaging PATCH requires at least one change. LaunchPlatformCampaignRequest requires an explicit project; SkipMissingVariables and ScheduledAt pointers preserve false and zero. Approval, consent, funding, sender and enrollment remain API decisions.

Campaign analytics preserve null timing metrics separately from zero. Recipient FailureReason, MessagesSent, NextMessageAt, SequenceError and FollowUp reflect the returned report. NextMessageAt is *float64 so Messaging fractional values survive. Recipient-list reason/status/cursor/limit can coexist. CSV export keeps its separate filtering rules.

HistorySyncPolicy reads archive or descriptor delivery. Writes use HistorySyncPolicyPatch and HistoryDeliverySetDescriptor. Setting delivery or resetting ConnectionResetHistoryDelivery selects 2026-10-14 only when the request version is absent. A whole-history reset and ordinary GET keep 2026-09-22. Explicit versions are preserved. Go treats an empty RequestOptions.APIVersion as absent. Initial QuickLinks also accept SignalMode; supplementary links cannot change custody. Connection.SignalMode is an optional immutable read fact. Configuration cannot change custody or grant browser tunnel access.

WebhookEvent.TypedPayload distinguishes DirectHistorySyncMediaPayload and DirectHistorySyncInlinePayload before archive and Cloud history. They use projected whatsapp_ids, original_whatsapp_ids and oldestMessageAt. Media uses type: md-msg-hist; inline uses zlib-base64-protobuf. Exactly one branch is required. Retry correlation uses a Linked Devices chunk ID, never an event UUID. Treat media keys and inline history as private; formatted descriptors are redacted. Public event parsing does not decrypt, download, store or acknowledge history.

Scoped Client tokens may use relay media upload and pure custom encrypted-byte transports. Direct upload grants and history commands require a server principal. Selected built-in direct upload is refused before plaintext is read. No-key unsafe writes retain conservative retry behavior; a caller key and explicit retry count authorize replay where supported. Request body, recipient and owner bytes are captured once. Safe response headers include trace/replay metadata; request ID and trace ID remain distinct. Unknown error codes remain available.

These source and local package contracts do not establish registry publication, deployed API availability, provider acceptance or feature enrollment. Hosted QuickLink invitation controls, Console configuration/enrollment and the host feature evaluator remain excluded. Signal core/service work, strict compressed history, history-storage dispatch, numeric coercion, general cursor and stream repairs have separate checkpoints.

Strict compressed history support

The local history decoder accepts one complete gzip, zlib or raw DEFLATE stream. It rejects unused compressed bytes, concatenated streams, truncation, dictionaries, reserved gzip flags and corrupt wrapper checksums before protobuf parsing. The Go standard gzip reader accepts at most 511 non-NUL bytes in each filename and comment. Complete streams exceeding either existing limit are unsupported; the SDK does not replace the standard reader. Extra fields retain the gzip 16-bit length boundary. Required HistorySync.syncType remains enforced, so a complete stream with empty output is a protobuf refusal.

Independent public tests cover stored, fixed, dynamic and multiple DEFLATE blocks, optional headers, exact byte caps, valid unused final-byte bits and malformed streams. Context cancellation is checked before and between reads; it does not interrupt a synchronous standard-library read or protobuf parse. Authenticated downloads still verify ciphertext, MAC and plaintext hash before decoding. Signed archive storage tests use an application projection of common fields; they do not establish descriptor dispatch or full-schema storage. These local tests do not establish registry publication or live availability.

Descriptor history storage

storage.ApplyEventOptions.DecodeHistory remains archive-only, with its original arguments and nullable progress-only result. Use DecodeHistoryDescriptor for validated public media/inline descriptors and return a non-nil map containing your application's decoded storage projection. For example:

options := storage.ApplyEventOptions{
    DecodeHistoryDescriptor: func(ctx context.Context, payload map[string]any, event polymorfa.WebhookEvent) (map[string]any, error) {
        return downloadDecodeAndProjectAuthorizedHistory(ctx, payload, event)
    },
}

The application defines downloadDecodeAndProjectAuthorizedHistory; existing public history helpers verify compressed/encrypted bytes and accept a caller's full-schema codec. The bridge never downloads media or changes custody. Default DescriptorDecode rejects missing, nil, failed or invalid decoding before any progress, marker, checkpoint or ACK. A legitimate empty map is allowed. HistoryDescriptorMode: storage.DescriptorMetadataOnly validates and consumes progress without any decoder. This deduplicates the event; configuring a decoder later cannot import it through ordinary replay. Valid duplicates skip callbacks. Descriptor notification IDs are not message IDs; existing wa: fallback keys remain, without an opaque-ID joining guarantee. Content/marker commit precedes checkpoint CAS and manual ACK. A failed ACK leaves committed data intact. Cloud history and archive behavior are unchanged. This is local package behavior, not registry or deployed availability.

Decoded-history numeric strings use the TypeScript producer's finite Number(string) results, including exact ECMAScript whitespace, unsigned radix integers and nearest-even binary64 rounding beyond uint64. Generic row numbers, safe revisions, leases and CAS remain strict. Shared producer vectors and local physical-module consumers verify this compatibility; registry publication and matching environment acceptance remain separate release gates.

Credential handling

Treat every Polymorfa credential as an opaque string. Pass the complete value from the Console. Never parse credentials or assume a fixed length. Store at least 512 characters, preferably unrestricted text. Client-token length varies with its bindings, Customer block and signing key ID.

The SDK checks server-credential prefixes, canonical base64url and the checksum. These checks do not authenticate a credential. The API checks the issuance record and live permissions. Test keys use the same project-token format; their test-only restriction is enforced by the service.

Event-stream validation and limits

Project event streams retain the previous resume cursor until an event's base64 payload and webhook envelope validate. Malformed server data follows the existing reconnect policy. A frame has a 4 MiB UTF-8 wire-byte budget, including incomplete lines, all data: lines, field syntax and comments. A terminating blank line resets the budget. Oversized frames reconnect from the previous validated cursor. Storage synchronization preserves Params.Since when no durable checkpoint exists; a saved checkpoint overrides it. Event commit, checkpoint CAS and manual ACK keep that order. These changes are unreleased source behavior.

Official API round-2 betas

Native Connection catalog-cache reads/sync, marketing status, Official group JPEG upload, identity changes, incoming carts and signed webhook batches have source counterparts. These additions remain unreleased betas and may return feature_unavailable. They grant no enrollment or provider authority. See the shared beta guide for ownership, batching, whole-body signatures and release gates.

The following uses an existing server client. Preserve the API's opaque cursor; stop when the response omits it. Catalog prices remain exact strings.

limit := 100
page, err := client.Catalogs().ListProducts(ctx, "number-id", "123", polymorfa.CatalogProductsParams{Limit: &limit, Cursor: "opaque_-"})
if err != nil { return err }
next := page.Data.Data.NextCursor
_ = next

Simultaneous calls source preparation

This counterpart is prepared against API #559 merge c1a43a1e. It is not a registry availability claim. Use the HTTP API until a matching SDK release is published and accepted against the target environment.

Call-settings reads expose simultaneousCalls, default false. Updates accept simultaneousCalls and acknowledgeRisk. Omission preserves stored state; explicit false disables the setting. Acknowledgment alone changes no setting and is rejected. The API requires a team key and acknowledgeRisk: true for an off-to-on transition. Project tokens may disable it. The SDK forwards values without guessing the stored state. Existing invalid_parameter, permission_denied and state_conflict errors remain authoritative.

The setting affects linked-device Connections. Cloud API Connections ignore it. Unlimited concurrent calls differ from WhatsApp's apps and void Ban Insurance when the 30-day claim window overlaps an enabled period. Claim verdicts and bansafe.claim webhook verdicts recognize simultaneous_calls. Claim evidence includes simultaneousCalls; the webhook does not acquire an evidence object.

Ban Credit claims also recognize linked_device_interactive (the Number sent an interactive message from a linked device in the 30 days before the ban), on claim reads and bansafe.claim webhooks. It opens denied with amount 0. Claim evidence includes linkedDeviceInteractive; claims filed before it was recorded report false.

No browser/client-token authority, call media behavior, automatic state read, retry policy or feature availability is added by these SDK fields.

Campaign webhook metadata (unreleased source)

Automatic campaign.paused payloads can include open-string reason and code; manual pauses omit both. pausedAt is Unix seconds. campaign.recipient_skipped can include nonnegative messageIndex (including zero) and a UUID followUpId. skippedAt is Unix milliseconds. Missing optional fields remain absent. Do not infer a pause cause from an unknown future code.

// event is a verified polymorfa.WebhookEvent.
payload, known, err := event.TypedPayload()
if err != nil { return err }
if known {
    switch p := payload.(type) {
    case *polymorfa.CampaignPausedPayload:
        fmt.Println(p.Code, p.PausedAt) // seconds; nil code for a manual pause
    case *polymorfa.CampaignRecipientSkippedPayload:
        fmt.Println(p.MessageIndex, p.FollowUpID, p.SkippedAt) // milliseconds; preserve *MessageIndex == 0
    }
}

These are verified-event handling fragments, not complete receivers. Preserve whole-body signature verification before decoding and deduplicate batch members. See the scoped source contract and compatibility notes. Package publication and matching API environment acceptance remain separate gates.

Interactive-message candidate (unreleased)

This source targets the separately pinned interactive backend candidate in contracts/interactive-messages.json. It does not establish hosted availability or registry publication. Native button messages support image, video and document headers with exactly one URL or base64 source; a title cannot accompany media. Carousels contain 2–10 image/video cards. Only the outer carousel has a footer; video previews remain inside the video object. Each complete carousel is one message request. Linked Devices allow ten controls with at most three CTAs; replies can mix with URL/call controls, but not copy/catalog controls.

Composed campaign buttons now expose an optional typed id. Preserve it across label changes and make reply IDs unique within the message. Existing media and carousel-template campaign paths retain the API's sender checks. These are composed campaign messages, not reply-flow actions: the latter retain their separate three-reply contract. The API remains authoritative for sender availability, media sizes, control limits and campaign sendability.

Existing Extra["id"] string values remain supported. When both ID and the extension are supplied, they must agree; conflicting or non-string extension values fail before HTTP. Serialization does not mutate the caller's extension map.

Call settings exclusion end (Unreleased)

Call-settings GET and PUT responses include the read-only simultaneousCallsCoverageExcludedUntil field as an RFC3339 string or null. While simultaneousCalls is on, null means the exclusion has no end yet. When it is off, a future timestamp is 30 days after the latest period ended. A ban is excluded when the setting was on at any time in the 30 days before it, so until that timestamp a new ban is not refunded. At that timestamp the earlier period no longer excludes a ban. Null while off means no recent period was reported. Neither null nor an elapsed timestamp guarantees coverage; all other Ban Insurance conditions still apply.

The server calculates this value. Do not send it in an update or calculate it from the current switch alone. This addition is unreleased; source preparation does not establish API deployment or package publication.

Prefer keyed response struct literals when constructing synthetic settings.

Direct passkey relay (unreleased)

Use server credentials with connections:manage for every operation, including reads. The API also checks live Connection ownership, direct-pairing access, relay enrollment and the current attempt. These methods accept ceremony data supplied by an external participant. They do not run WebAuthn, store credentials, poll, or confirm a pairing automatically. Hosted QuickLink and extension relay endpoints are excluded.

Challenge TTL uses seconds; ceremony timeoutMs uses milliseconds. The server owns ceremony options and ignores the deprecated userVerification and timeoutMs request fields. An optional expected challengeB64Url must match the current attempt. Keep rawIdB64Url and the named *B64 assertion strings unchanged; do not convert between base64 and base64url. Omit optional fields when absent.

Challenge issuance, assertion submission and explicit confirmation each make one attempt, even with caller retry options or an idempotency key. If the outcome is uncertain, read current challenge/confirmation state and reconcile it before a new write. Assertion acceptance is not pairing completion. Forwarded API failures keep their status and open error code; the SDK does not invent passkey error codes.

The whole JSON body is limited to 1 MiB. Credential ID strings allow 1364 UTF-16 units and optional user handles allow 86. Other opaque assertion fields share the body limit. The API validates encodings, decoded bounds and challenge binding.

The matching API source is accepted. Package qualification and publication are still required before using a released package.

ticket, err := client.Passkeys().IssueChallenge(ctx, connection, polymorfa.IssuePasskeyChallengeRequest{})
if err != nil { return err }
_, err = client.Passkeys().GetChallenge(ctx, connection, ticket.Data.Data.Ticket)
if err != nil { return err }
_, err = client.Passkeys().SubmitAssertion(ctx, connection, suppliedAssertion)
if err != nil { return err }
_, err = client.Passkeys().GetConfirmation(ctx, connection)
if err != nil { return err }
// Call only after an explicit caller decision based on the current state.
confirmExplicitly := func() error {
    _, err := client.Passkeys().Confirm(ctx, connection, suppliedConfirmation)
    return err
}
_ = confirmExplicitly

Connection call history (unreleased source)

Read one Connection's calls with the other party's identity through GET /messaging/{connection}/calls. Client tokens need read_calls. The route requires the regional call-history API deployment; this source change does not make it available on a deployed API or package registry.

page, err := messaging.ConnectionCalls().List(ctx, "support", polymorfa.ListConnectionCallsParams{
    ListParams: polymorfa.ListParams{Limit: 25}, Outcome: "missed",
})

The response contains data and a nullable nextCursor (Data and NextCursor in .NET; next_cursor in Rust). Pass a returned cursor in the next request. Filters include direction, outcome and ISO 8601 start-time bounds since/until. peer may be null; its user ID, phone number and username may each be absent. Platform call records keep peerRef.

Connection-scoped Test operations

The Test phone methods take a Connection ID, without a project argument:

phone, err := client.Testing().GetPhone(ctx, "support")
event, err := client.Testing().TriggerEvent(ctx, "support", polymorfa.TriggerTestEventRequest{
    Event: "call.missed", FromConnection: "sales",
})
fixtures, err := client.Testing().ListEventFixtures(ctx)

Send-phone-message and unlink-device helpers use the same Connection scope. The trigger body contains event, optional overrides and optional fromConnection; the target Connection is a separate method argument. The static fixture catalog has no project argument. History-fixture creation remains project-scoped. These operations require a server credential and the API’s Test-Connection access checks; a helper does not grant access or make a real Connection a Test Connection.

Guest participants and waiting rooms (unreleased)

Call participants and participant webhooks can include optional guest and name fields. A guest can have an opaque public ID without a phone number. The name is self-reported; display it as text and never use it for authorization. A name change updates the existing participant ID. Video-source labels prefer the name, then the phone number, then the public ID.

call.Snapshot().WaitingRoom exposes the latest waiting-room state and pending public identities. Host controls are call.SetApprovalRequired(ctx, true), call.AdmitParticipant(ctx, "739182640518203") and call.DenyParticipant(ctx, "739182640518203"). They require the current media connection, call-owner authority and current provider administrator state. Pass a pending participant's public ID, never a provider address. Commands wait for a matching acknowledgement and do not change the roster optimistically. A timeout or connection loss leaves the outcome unknown. Inspect fresh state before trying again; reconnect does not replay moderation commands.

These methods require the matching unreleased backend. Source and local package builds do not establish registry publication or deployed availability. They do not enable anonymous Polymorfa access or guest messaging.

Authenticated HTTP moderation (unreleased)

client.VoIP().ModerateWaitingRoom sends a correlated action to POST /messaging/voip/calls/{id}/waiting-room. Supply the held connection ID and an action with type: waiting_room_control, requestId, and either toggle with enabled, or admit/deny with the pending participant's public ID. Server credentials may name their connection's participant; client tokens omit that field and need voip_signal.

The API checks current credential and Connection/project authority per request. Read data.ok and data.code; HTTP success alone does not confirm the provider action. The SDK disables automatic network retries for this operation. A missing reply or unknown outcome must not be replayed. Browser UI-kit controls use this HTTP path; programmatic media WebSocket controls retain their credential rechecks. This source requires the matching unreleased backend. It does not enable a customer environment or advance package/API availability.

Event-stream items expose a decoded Connection view. A retained native body's old account selector becomes connection in that view. The event's encoded payload keeps the original bytes. Mixed selector generations are refused; active webhook verification and parsing keep the current envelope contract.

Documentation

Overview

Package polymorfa provides handwritten server clients for the Polymorfa Messaging and Platform APIs. Credentials must be kept on the application server. Browser and WASM applications use the TypeScript browser packages.

Index

Constants

View Source
const (
	ConfigurationPlatform   ConfigurationSource      = "platform"
	ConfigurationTeam       ConfigurationSource      = "team"
	ConfigurationProject    ConfigurationSource      = "project"
	ConfigurationConnection ConfigurationSource      = "connection"
	ConfigurationConsent    ConfigurationValueSource = "consent"
)
View Source
const (
	ConnectionResetHistorySync        = "historySync"
	ConnectionResetHistoryMode        = "historySync.mode"
	ConnectionResetHistoryRequestFull = "historySync.requestFull"
	ConnectionResetHistoryDelivery    = "historySync.delivery"
	ConnectionResetHMS                = "hms"
	ConnectionResetObservation        = "observation"
	ConnectionResetPresence           = "observation.presenceMode"
	ConnectionResetTyping             = "observation.typingMode"
	ConnectionResetLabel              = "observation.labelMode"
	ConnectionResetQuickReply         = "observation.quickReplyMode"
)

These reset paths keep existing []string callers source-compatible.

View Source
const (
	ErrorCampaignApprovalRequired = "campaign_approval_required"
	ErrorCampaignApprovalStale    = "campaign_approval_stale"
	ErrorCampaignVariablesMissing = "campaign_variables_missing"
	ErrorZeroKnowledgeConnection  = "zero_knowledge_connection"
)
View Source
const (
	ReadinessCredentialsInvalid   = "meta_credentials_invalid"
	ReadinessPhoneNotRegistered   = "meta_phone_not_registered"
	ReadinessWebhookNotSubscribed = "meta_webhook_not_subscribed"
	ReadinessPaymentMethodMissing = "meta_payment_method_missing"
	ReadinessQualityFlagged       = "meta_quality_flagged"
	ReadinessUnknown              = "meta_readiness_unknown"
)

QuickLink error codes remain open strings, including future readiness failures.

View Source
const (
	RequestLogAPI          RequestLogSource         = "api"
	RequestLogMCP          RequestLogSource         = "mcp"
	RequestLogTeamKey      RequestLogCredentialType = "team_key"
	RequestLogProjectToken RequestLogCredentialType = "project_token"
	RequestLogClientToken  RequestLogCredentialType = "client_token"
	RequestLogGET          RequestLogMethod         = "GET"
	RequestLogPOST         RequestLogMethod         = "POST"
	RequestLogPUT          RequestLogMethod         = "PUT"
	RequestLogPATCH        RequestLogMethod         = "PATCH"
	RequestLogDELETE       RequestLogMethod         = "DELETE"
	RequestLog1xx          RequestLogStatus         = "1xx"
	RequestLog2xx          RequestLogStatus         = "2xx"
	RequestLog3xx          RequestLogStatus         = "3xx"
	RequestLog4xx          RequestLogStatus         = "4xx"
	RequestLog5xx          RequestLogStatus         = "5xx"
)
View Source
const APIVersion = "2026-09-22"
View Source
const CallsDefaultSampleRate = 16000
View Source
const CallsMediaSubprotocol = "pmfa.calls.v2"
View Source
const CustomerOwnedAPIVersion = "2026-10-14"
View Source
const DefaultHistorySyncMaxInflatedBytes int64 = 512 * 1024 * 1024
View Source
const DefaultWhatsAppMediaMaxBytes int64 = 256 * 1024 * 1024
View Source
const FlowForwardSignatureHeader = "X-Polymorfa-Flow-Signature"
View Source
const SignalSidecarSourceCommit = "61209057729b002a2122b898d744a8813a702fc7"
View Source
const Version = "0.1.0-preview.20261124042948"
View Source
const VoiceAudioMaxUploadBytes int64 = 16777216

Variables

View Source
var PasskeyConfirmationStatuses = []string{"none", "challenge_pending", "assertion_sending", "assertion_submitted", "code_available", "confirmation_sending", "waiting_for_pairing", "completed", "failed"}

Functions

func CreateConnectionID

func CreateConnectionID() (string, error)

func DecodeWebhookPayload

func DecodeWebhookPayload[T any](e WebhookEvent) (T, error)

DecodeWebhookPayload decodes a verified event into an application-selected payload type. Unknown events remain accessible through Event.Payload.

func DecryptWhatsAppMedia

func DecryptWhatsAppMedia(data []byte, keys WhatsAppMediaKeys, d WhatsAppMediaDescriptor, maxBytes int64) ([]byte, error)

DecryptWhatsAppMedia verifies encrypted hash, MAC, CBC padding and plaintext hash before returning any bytes. Media keys and content never enter errors.

func DecryptWhatsAppMediaStream

func DecryptWhatsAppMediaStream(ctx context.Context, source io.Reader, keys WhatsAppMediaKeys, d WhatsAppMediaDescriptor, maxBytes int64, mode WhatsAppMediaVerifyMode) (io.ReadCloser, error)

DecryptWhatsAppMediaStream consumes and closes source. Before-release buffers verified plaintext; streaming releases plaintext before final integrity checks and reports any failure on the reader. Always check the final read.

func EncodeAudioFrame

func EncodeAudioFrame(pcm []int16) []byte

func EncodeVideoFrame

func EncodeVideoFrame(v VideoFrame) []byte

func GraphTransportHeaders

func GraphTransportHeaders(transport MessageTransport) http.Header

func IsKnownErrorCode

func IsKnownErrorCode(code string) bool

IsKnownErrorCode reports whether code is in the pinned API catalog.

func IsWhatsAppMediaURL

func IsWhatsAppMediaURL(value string) bool

func KnownErrorCodes

func KnownErrorCodes() []string

KnownErrorCodes returns an independent copy of the stable API error catalog. Error.Code continues to preserve arbitrary new codes returned by the API.

func ParseContentDispositionFilename

func ParseContentDispositionFilename(header string) string

ParseContentDispositionFilename returns a sanitized display name, never a path. The first filename* parameter takes precedence when its encoding is valid.

func RequestLogRetryAfter

func RequestLogRetryAfter(header string, now time.Time) time.Duration

RequestLogRetryAfter returns a bounded delay; absent or invalid values use one minute.

func SignedURLExpiry

func SignedURLExpiry(value string) *time.Time

func VerifyFlowForwardSignature

func VerifyFlowForwardSignature(raw []byte, signature, secret string, o VerifyFlowForwardOptions) bool

func VerifyWebhookSignature

func VerifyWebhookSignature(body []byte, signature, secret string) bool

func WebhookHandler

func WebhookHandler(secret string, maxBodyBytes int64, handle func(*http.Request, WebhookEvent) error) http.Handler

WebhookHandler is a net/http adapter. It reads and verifies the exact request bytes before invoking the callback. Frameworks can mount it as a handler. Native HMAC signatures have no timestamp/replay claim: deduplicate event IDs in the application's durable store before applying effects.

func WriteMediaToFile

func WriteMediaToFile(ctx context.Context, source io.ReadCloser, path string, overwrite bool) (int64, error)

WriteMediaToFile writes a private sibling file and installs it only after the source completes without error. The default refuses an existing destination.

Types

type APIKeyDeactivation

type APIKeyDeactivation struct {
	OK    bool   `json:"ok"`
	KeyID string `json:"keyId"`
}

type APIKeyRecord

type APIKeyRecord struct {
	ID           string  `json:"id"`
	StorageID    string  `json:"_id"`
	CreationTime float64 `json:"_creationTime"`
	KeyID        string  `json:"keyId"`
	Start        string  `json:"start"`
	Last4        string  `json:"last4"`
	TeamID       string  `json:"teamId"`
	Label        string  `json:"label"`
	Scopes       int64   `json:"scopes"`
	Source       string  `json:"source"`
	ExpiresAt    *int64  `json:"expiresAt"`
	LastUsed     *int64  `json:"lastUsed,omitempty"`
	IsActive     bool    `json:"isActive"`
}

type APIKeys

type APIKeys struct {
	// contains filtered or unexported fields
}

func (*APIKeys) Deactivate

func (*APIKeys) List

type APIMediaFileResult

type APIMediaFileResult struct {
	Path                  string
	Bytes                 int64
	ContentType, Filename string
	Metadata              Metadata
}

type AcceptCallRequest

type AcceptCallRequest struct {
	Exclusive   *bool  `json:"exclusive,omitempty"`
	Video       *bool  `json:"video,omitempty"`
	Participant string `json:"participant,omitempty"`
}

type AcceptedCall

type AcceptedCall struct {
	Answered   bool   `json:"answered"`
	AnsweredBy string `json:"answeredBy"`
	Exclusive  bool   `json:"exclusive"`
}

type AddAudienceMembersRequest

type AddAudienceMembersRequest struct {
	Members []CampaignRecipientInput `json:"members"`
}

type AddAudienceMembersResult

type AddAudienceMembersResult struct {
	ListID         string                `json:"listId"`
	Added          int                   `json:"added"`
	RecipientCount int                   `json:"recipientCount"`
	DuplicateCount int                   `json:"duplicateCount"`
	InvalidCount   int                   `json:"invalidCount"`
	InvalidRows    []InvalidRecipientRow `json:"invalidRows"`
}

type AddCallParticipantRequest

type AddCallParticipantRequest struct {
	To string `json:"to"`
}

type AddCampaignRecipientsRequest

type AddCampaignRecipientsRequest struct {
	Recipients []CampaignRecipientInput `json:"recipients"`
}

type AddCampaignRecipientsResult

type AddCampaignRecipientsResult struct {
	CampaignID     string                `json:"campaignId"`
	Added          int                   `json:"added"`
	RecipientCount int                   `json:"recipientCount"`
	DuplicateCount int                   `json:"duplicateCount"`
	InvalidCount   int                   `json:"invalidCount"`
	InvalidRows    []InvalidRecipientRow `json:"invalidRows"`
}

type AddPlatformCampaignRecipientsRequest

type AddPlatformCampaignRecipientsRequest struct {
	ProjectID  string                   `json:"projectId"`
	Recipients []CampaignRecipientInput `json:"recipients"`
}

type AddressContent

type AddressContent struct {
	Body       string `json:"body"`
	ButtonText string `json:"buttonText,omitempty"`
	Footer     string `json:"footer,omitempty"`
	Country    string `json:"country,omitempty"`
}

type Analytics

type Analytics struct {
	// contains filtered or unexported fields
}

func (*Analytics) Get

func (*Analytics) Metrics

type AnalyticsMetricsParams

type AnalyticsMetricsParams struct {
	ProjectID, ConnectionID string
	WindowHours             int
	Segments                *bool
	Format                  string
}

type AnalyticsParams

type AnalyticsParams struct {
	ProjectID, ConnectionID string
	Start, End              *int64
}

type AnalyticsPeriod

type AnalyticsPeriod struct {
	Start int64 `json:"start"`
	End   int64 `json:"end"`
}

type AnalyticsRequestVitals

type AnalyticsRequestVitals struct {
	Requests  int64    `json:"requests"`
	Failures  int64    `json:"failures"`
	ErrorRate *float64 `json:"errorRate"`
}

type AnalyticsSettings

type AnalyticsSettings struct {
	Enabled bool `json:"enabled"`
}

type AsyncAccepted

type AsyncAccepted struct {
	RequestID string `json:"requestId"`
}

type AsyncResult

type AsyncResult[T any] struct {
	Value    *T
	Accepted *AsyncAccepted
}

AsyncResult narrows runner admission from the completed resource result. RequestID means accepted asynchronously; Value means a completed response.

func (AsyncResult[T]) MarshalJSON

func (r AsyncResult[T]) MarshalJSON() ([]byte, error)

func (*AsyncResult[T]) UnmarshalJSON

func (r *AsyncResult[T]) UnmarshalJSON(b []byte) error

type Audience

type Audience struct {
	ID             string                     `json:"id"`
	Name           string                     `json:"name"`
	Source         string                     `json:"source"`
	RecipientCount int                        `json:"recipientCount"`
	FileID         *string                    `json:"fileId"`
	Columns        *[]string                  `json:"columns"`
	SampleRow      map[string]string          `json:"sampleRow"`
	Mapping        map[string]json.RawMessage `json:"mapping"`
	CreatedAt      int64                      `json:"createdAt"`
	UpdatedAt      int64                      `json:"updatedAt"`
}

type AudienceConsentAssertion

type AudienceConsentAssertion struct {
	AudienceProfileConsentInput
	ID              string `json:"id"`
	ProfileRevision int64  `json:"profileRevision"`
	CreatedAt       int64  `json:"createdAt"`
}

type AudienceFromCampaignResult

type AudienceFromCampaignResult struct {
	ID               string                      `json:"id"`
	Name             string                      `json:"name"`
	Source           string                      `json:"source"`
	RecipientCount   int64                       `json:"recipientCount"`
	FileID           *string                     `json:"fileId"`
	Columns          *[]string                   `json:"columns"`
	SampleRow        *map[string]string          `json:"sampleRow"`
	Mapping          *map[string]json.RawMessage `json:"mapping"`
	CreatedAt        int64                       `json:"createdAt"`
	UpdatedAt        int64                       `json:"updatedAt"`
	SourceCampaignID string                      `json:"sourceCampaignId"`
	Outcome          CampaignRetargetOutcome     `json:"outcome"`
	MatchedCount     int64                       `json:"matchedCount"`
	OptedOutCount    int64                       `json:"optedOutCount"`
}

type AudienceImportMapping

type AudienceImportMapping struct {
	Phone     string            `json:"phone"`
	Variables map[string]string `json:"variables,omitempty"`
}

type AudienceImportResult

type AudienceImportResult struct {
	Audience
	DuplicateCount int                   `json:"duplicateCount"`
	InvalidCount   int                   `json:"invalidCount"`
	InvalidRows    []InvalidRecipientRow `json:"invalidRows"`
}

type AudienceMember

type AudienceMember struct {
	ID        string            `json:"id"`
	Phone     string            `json:"phone"`
	Variables map[string]string `json:"variables"`
	CreatedAt int64             `json:"createdAt"`
}

type AudienceProfile

type AudienceProfile struct {
	ID         string                              `json:"id"`
	Phone      string                              `json:"phone"`
	Revision   int64                               `json:"revision"`
	Tags       []string                            `json:"tags"`
	Attributes map[string]AudienceProfileAttribute `json:"attributes"`
	Provenance *AudienceProfileProvenance          `json:"provenance"`
	CreatedAt  int64                               `json:"createdAt"`
	UpdatedAt  int64                               `json:"updatedAt"`
}

type AudienceProfileAttribute

type AudienceProfileAttribute struct{ Value *CampaignVariable }

AudienceProfileAttribute is one JSON scalar or null. A zero value is null. Non-null values use exactly one CampaignVariable scalar variant.

func (AudienceProfileAttribute) MarshalJSON

func (v AudienceProfileAttribute) MarshalJSON() ([]byte, error)

func (*AudienceProfileAttribute) UnmarshalJSON

func (v *AudienceProfileAttribute) UnmarshalJSON(data []byte) error

type AudienceProfileConsentInput

type AudienceProfileConsentInput struct {
	AudienceProfileProvenance
	Purpose    string `json:"purpose"`
	Allowed    bool   `json:"allowed"`
	AssertedAt int64  `json:"assertedAt"`
}

type AudienceProfileImportConflictSample

type AudienceProfileImportConflictSample struct {
	Row    int64  `json:"row"`
	Reason string `json:"reason"`
}

type AudienceProfileImportInvalidSample

type AudienceProfileImportInvalidSample struct {
	Row    int64  `json:"row"`
	Reason string `json:"reason"`
}

type AudienceProfileImportJob

type AudienceProfileImportJob struct {
	ID              string                                `json:"id"`
	State           string                                `json:"state"`
	TotalValid      int64                                 `json:"totalValid"`
	InvalidCount    int64                                 `json:"invalidCount"`
	InvalidSamples  []AudienceProfileImportInvalidSample  `json:"invalidSamples"`
	ConflictSamples []AudienceProfileImportConflictSample `json:"conflictSamples"`
	ProcessedValid  int64                                 `json:"processedValid"`
	CreatedCount    int64                                 `json:"createdCount"`
	UpdatedCount    int64                                 `json:"updatedCount"`
	ConflictCount   int64                                 `json:"conflictCount"`
	CreatedAt       int64                                 `json:"createdAt"`
	UpdatedAt       int64                                 `json:"updatedAt"`
	CompletedAt     *int64                                `json:"completedAt"`
}

type AudienceProfileImportMapping

type AudienceProfileImportMapping struct {
	Phone               string  `json:"phone"`
	Tags                string  `json:"tags"`
	Attributes          string  `json:"attributes"`
	ExpectedRevision    *string `json:"expectedRevision,omitempty"`
	ProvenanceReference *string `json:"provenanceReference,omitempty"`
	ConsentAllowed      *string `json:"consentAllowed,omitempty"`
	ConsentAssertedAt   *string `json:"consentAssertedAt,omitempty"`
	ConsentReference    *string `json:"consentReference,omitempty"`
}

type AudienceProfileImports

type AudienceProfileImports struct {
	// contains filtered or unexported fields
}

func (*AudienceProfileImports) Cancel

Cancel cancels the durable import. Cancelling an HTTP waiter does not cancel it.

func (*AudienceProfileImports) Retrieve

type AudienceProfileProvenance

type AudienceProfileProvenance struct {
	Source    AudienceProfileSource `json:"source"`
	Reference string                `json:"reference"`
}

type AudienceProfileSource

type AudienceProfileSource string
const (
	AudienceProfileAPI  AudienceProfileSource = "api"
	AudienceProfileCSV  AudienceProfileSource = "csv"
	AudienceProfileForm AudienceProfileSource = "form"
)

type AudienceProfiles

type AudienceProfiles struct {
	// contains filtered or unexported fields
}

AudienceProfiles stores customer-supplied campaign profiles, not synced contacts.

func (*AudienceProfiles) Delete

func (*AudienceProfiles) Imports

func (*AudienceProfiles) Put

func (*AudienceProfiles) Retrieve

type AudienceSegment

type AudienceSegment struct {
	ID        string               `json:"id"`
	Name      string               `json:"name"`
	Revision  int                  `json:"revision"`
	Rules     AudienceSegmentRules `json:"rules"`
	CreatedAt int64                `json:"createdAt"`
	UpdatedAt int64                `json:"updatedAt"`
}

type AudienceSegmentAttributeCompare

type AudienceSegmentAttributeCompare struct {
	Name     string
	Operator AudienceSegmentOperator
	Value    float64
}

AudienceSegmentAttributeCompare uses greater_than or less_than.

func (AudienceSegmentAttributeCompare) MarshalJSON

func (v AudienceSegmentAttributeCompare) MarshalJSON() ([]byte, error)

type AudienceSegmentAttributeEquals

type AudienceSegmentAttributeEquals struct {
	Name  string
	Value any
}

AudienceSegmentAttributeEquals matches a string, number or boolean of the same type.

func (AudienceSegmentAttributeEquals) MarshalJSON

func (v AudienceSegmentAttributeEquals) MarshalJSON() ([]byte, error)

type AudienceSegmentAttributeExists

type AudienceSegmentAttributeExists struct{ Name string }

func (AudienceSegmentAttributeExists) MarshalJSON

func (v AudienceSegmentAttributeExists) MarshalJSON() ([]byte, error)

type AudienceSegmentAttributeIn

type AudienceSegmentAttributeIn struct {
	Name   string
	Values []any
}

AudienceSegmentAttributeIn matches any of up to 50 strings or numbers.

func (AudienceSegmentAttributeIn) MarshalJSON

func (v AudienceSegmentAttributeIn) MarshalJSON() ([]byte, error)

type AudienceSegmentAttributeText

type AudienceSegmentAttributeText struct {
	Name     string
	Operator AudienceSegmentOperator
	Value    string
}

AudienceSegmentAttributeText uses contains, before or after with a string value.

func (AudienceSegmentAttributeText) MarshalJSON

func (v AudienceSegmentAttributeText) MarshalJSON() ([]byte, error)

type AudienceSegmentCampaignOutcome

type AudienceSegmentCampaignOutcome struct {
	CampaignID string
	Outcome    string
}

AudienceSegmentCampaignOutcome outcome is delivered, not_delivered, read, not_read, replied, not_replied or failed.

func (AudienceSegmentCampaignOutcome) MarshalJSON

func (v AudienceSegmentCampaignOutcome) MarshalJSON() ([]byte, error)

type AudienceSegmentCondition

type AudienceSegmentCondition interface {
	// contains filtered or unexported methods
}

AudienceSegmentCondition is one rule condition. Missing, null or wrong-type attributes do not match. Unknown server conditions decode as AudienceSegmentUnknownCondition so reads stay forward compatible.

type AudienceSegmentConsentEquals

type AudienceSegmentConsentEquals struct{ Value bool }

func (AudienceSegmentConsentEquals) MarshalJSON

func (v AudienceSegmentConsentEquals) MarshalJSON() ([]byte, error)

type AudienceSegmentDeletion

type AudienceSegmentDeletion struct {
	Deleted bool   `json:"deleted"`
	ID      string `json:"id"`
}

type AudienceSegmentGroup

type AudienceSegmentGroup struct {
	Match      AudienceSegmentMatch       `json:"match"`
	Negate     *bool                      `json:"negate,omitempty"`
	Conditions []AudienceSegmentCondition `json:"conditions"`
}

AudienceSegmentGroup combines up to 20 conditions. Negate inverts the result.

func (*AudienceSegmentGroup) UnmarshalJSON

func (g *AudienceSegmentGroup) UnmarshalJSON(b []byte) error

type AudienceSegmentMatch

type AudienceSegmentMatch string
const (
	AudienceSegmentMatchAll AudienceSegmentMatch = "all"
	AudienceSegmentMatchAny AudienceSegmentMatch = "any"
)

type AudienceSegmentOperator

type AudienceSegmentOperator string
const (
	AudienceSegmentContains    AudienceSegmentOperator = "contains"
	AudienceSegmentBefore      AudienceSegmentOperator = "before"
	AudienceSegmentAfter       AudienceSegmentOperator = "after"
	AudienceSegmentGreaterThan AudienceSegmentOperator = "greater_than"
	AudienceSegmentLessThan    AudienceSegmentOperator = "less_than"
)

type AudienceSegmentPreview

type AudienceSegmentPreview struct {
	MatchedCount         int                     `json:"matchedCount"`
	OptedOutCount        int                     `json:"optedOutCount"`
	ConsentWithheldCount int                     `json:"consentWithheldCount"`
	EligibleCount        int                     `json:"eligibleCount"`
	Sample               []AudienceSegmentSample `json:"sample"`
	EvaluatedAt          int64                   `json:"evaluatedAt"`
}

type AudienceSegmentRules

type AudienceSegmentRules struct {
	Match  AudienceSegmentMatch   `json:"match"`
	Groups []AudienceSegmentGroup `json:"groups"`
}

AudienceSegmentRules allows at most 10 groups, 20 conditions per group, 40 conditions, 5 campaign conditions, 50 values per in condition and 16 KiB. The API enforces these limits.

type AudienceSegmentSample

type AudienceSegmentSample struct {
	// Phone is masked, for example +49*******12.
	Phone string   `json:"phone"`
	Tags  []string `json:"tags"`
}

type AudienceSegmentTagContains

type AudienceSegmentTagContains struct{ Value string }

func (AudienceSegmentTagContains) MarshalJSON

func (v AudienceSegmentTagContains) MarshalJSON() ([]byte, error)

type AudienceSegmentTagExists

type AudienceSegmentTagExists struct{}

func (AudienceSegmentTagExists) MarshalJSON

func (AudienceSegmentTagExists) MarshalJSON() ([]byte, error)

type AudienceSegmentTagIn

type AudienceSegmentTagIn struct{ Values []string }

func (AudienceSegmentTagIn) MarshalJSON

func (v AudienceSegmentTagIn) MarshalJSON() ([]byte, error)

type AudienceSegmentUnknownCondition

type AudienceSegmentUnknownCondition struct{ Raw json.RawMessage }

AudienceSegmentUnknownCondition preserves a condition this SDK does not model. It is read-only: requests containing it are rejected before sending.

func (AudienceSegmentUnknownCondition) MarshalJSON

func (v AudienceSegmentUnknownCondition) MarshalJSON() ([]byte, error)

type AudienceSegments

type AudienceSegments struct {
	// contains filtered or unexported fields
}

AudienceSegments are team resources: team keys only, campaigns:read for reads and campaigns:manage for writes and unsaved previews. Revision conflicts and bounded evaluation timeouts return 409 state_conflict; re-read, reconcile or simplify rules before trying again. Writes and previews are sent once.

func (*AudienceSegments) Delete

func (r *AudienceSegments) Delete(ctx context.Context, id string, expectedRevision int, o ...RequestOptions) (Response[Envelope[AudienceSegmentDeletion]], error)

Delete is refused while an unlaunched draft uses the segment. Launched campaigns keep their snapshot and recipients; their segment ID becomes nil.

func (*AudienceSegments) Preview

Preview evaluates the saved segment once; a bounded evaluation timeout is a 409.

func (*AudienceSegments) PreviewRules

PreviewRules evaluates unsaved rules once.

func (*AudienceSegments) Retrieve

type Audiences

type Audiences struct {
	// contains filtered or unexported fields
}

func (*Audiences) CreateUpload

func (*Audiences) Delete

func (*Audiences) DeleteMember

func (r *Audiences) DeleteMember(ctx context.Context, id, phone string, o ...RequestOptions) (Response[Envelope[DeleteAudienceMemberResult]], error)

func (*Audiences) List

List, Retrieve, Delete and CreateUpload preserve the TypeScript contract's open PlatformPayload response. Import/member operations have closed schemas.

func (*Audiences) ListMembers

func (*Audiences) Retrieve

type AuditLog

type AuditLog struct {
	ID          string          `json:"id"`
	ActorEmail  string          `json:"actorEmail"`
	ActorUserID *string         `json:"actorUserId"`
	ActorRole   *string         `json:"actorRole"`
	Action      string          `json:"action"`
	Resource    string          `json:"resource"`
	ProjectID   *string         `json:"projectId"`
	ProjectName *string         `json:"projectName"`
	IP          *string         `json:"ip"`
	UserAgent   *string         `json:"userAgent"`
	Duration    *float64        `json:"duration"`
	Source      *string         `json:"source"`
	Description *string         `json:"description"`
	Result      string          `json:"result"`
	Metadata    json.RawMessage `json:"metadata"`
	CreatedAt   int64           `json:"createdAt"`
}

type AuditLogs

type AuditLogs struct {
	// contains filtered or unexported fields
}

func (*AuditLogs) List

type BanSafe

type BanSafe struct {
	// contains filtered or unexported fields
}

func (*BanSafe) GetClaim

func (*BanSafe) GetHealth

func (r *BanSafe) GetHealth(ctx context.Context, connection string, o ...RequestOptions) (Response[Envelope[BanSafeConnectionDetail]], error)

func (*BanSafe) GetTelemetry

func (r *BanSafe) GetTelemetry(ctx context.Context, connection string, o ...RequestOptions) (Response[Envelope[BanSafeTelemetryDetail]], error)

func (*BanSafe) ListClaims

func (*BanSafe) ListFindings

func (*BanSafe) ListHealthHistory

func (*BanSafe) ListSignals

func (*BanSafe) ListTelemetryHistory

func (*BanSafe) RetractIncident

func (r *BanSafe) RetractIncident(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[BanSafeIncident]], error)

type BanSafeActionPayload

type BanSafeActionPayload struct {
	PhoneNumber         string                   `json:"phoneNumber"`
	Action              string                   `json:"action"`
	Scope               string                   `json:"scope"`
	Rung                string                   `json:"rung"`
	PreviousRung        *string                  `json:"previousRung"`
	Reason              string                   `json:"reason"`
	Health              *float64                 `json:"health"`
	HealthBand          string                   `json:"healthBand"`
	Requires            []BanSafeRequiredFinding `json:"requires"`
	ThroughputPerMinute *float64                 `json:"throughputPerMinute"`
	EligibleLiftAt      *string                  `json:"eligibleLiftAt"`
	LiftRequires        string                   `json:"liftRequires"`
	AppealURL           string                   `json:"appealUrl"`
	StartedAt           string                   `json:"startedAt"`
	Docs                string                   `json:"docs"`
	// contains filtered or unexported fields
}

type BanSafeClaim

type BanSafeClaim struct {
	ID            string               `json:"id"`
	IncidentID    string               `json:"incidentId"`
	ConnectionID  string               `json:"connectionId"`
	Connection    string               `json:"connection"`
	PhoneNumber   string               `json:"phoneNumber"`
	ProjectID     string               `json:"projectId"`
	Status        string               `json:"status"`
	Verdict       string               `json:"verdict"`
	WindowStart   string               `json:"windowStart"`
	WindowEnd     string               `json:"windowEnd"`
	MeasuredCents float64              `json:"measuredCents"`
	CapCents      float64              `json:"capCents"`
	AmountCents   float64              `json:"amountCents"`
	Evidence      BanSafeClaimEvidence `json:"evidence"`
	Summary       string               `json:"summary"`
	Reason        string               `json:"reason"`
	DecidedAt     *string              `json:"decidedAt"`
	PaidAt        *string              `json:"paidAt"`
	CreatedAt     string               `json:"createdAt"`
}

type BanSafeClaimEvidence

type BanSafeClaimEvidence struct {
	SimultaneousCalls       bool `json:"simultaneousCalls"`
	LinkedDeviceInteractive bool `json:"linkedDeviceInteractive"`
	AttributionRuleVersion  *int `json:"attributionRuleVersion"`
	WindowDays              int  `json:"windowDays"`
	DeviceEvidence          bool `json:"deviceEvidence"`
	OtherDevices            int  `json:"otherDevices"`
	RestrictedInWindow      bool `json:"restrictedInWindow"`
	CriticalFindingDays     int  `json:"criticalFindingDays"`
	SharedConnection        bool `json:"sharedConnection"`
	MeasuredHours           int  `json:"measuredHours"`
}

type BanSafeClaimPayload

type BanSafeClaimPayload struct {
	ID            string  `json:"id"`
	IncidentID    string  `json:"incidentId"`
	PhoneNumber   string  `json:"phoneNumber"`
	Status        string  `json:"status"`
	Verdict       string  `json:"verdict"`
	WindowStart   string  `json:"windowStart"`
	WindowEnd     string  `json:"windowEnd"`
	MeasuredCents float64 `json:"measuredCents"`
	CapCents      float64 `json:"capCents"`
	AmountCents   float64 `json:"amountCents"`
	Summary       string  `json:"summary"`
	Reason        string  `json:"reason"`
	DecidedAt     *string `json:"decidedAt"`
	PaidAt        *string `json:"paidAt"`
	// contains filtered or unexported fields
}

type BanSafeCollectionConnection

type BanSafeCollectionConnection struct {
	ConnectionID string                  `json:"connectionId"`
	Connection   string                  `json:"connection"`
	ProjectID    string                  `json:"projectId"`
	Collection   BanSafeCollectionStatus `json:"collection"`
}

type BanSafeCollectionStatus

type BanSafeCollectionStatus struct {
	State            string  `json:"state"`
	LatestFlushedAt  *string `json:"latestFlushedAt"`
	LatestReceivedAt *string `json:"latestReceivedAt"`
	FreshUntil       *string `json:"freshUntil"`
	RecordVersion    *int    `json:"recordVersion"`
	CollectorVersion *int    `json:"collectorVersion"`
	Partial          *bool   `json:"partial"`
	DroppedRecords   *int    `json:"droppedRecords"`
}

type BanSafeConnection

type BanSafeConnection struct {
	BanSafeHealthProjection
	ConnectionID string                        `json:"connectionId"`
	Connection   string                        `json:"connection"`
	PhoneNumber  string                        `json:"phoneNumber"`
	ProjectID    string                        `json:"projectId"`
	Enforcement  *BanSafeConnectionEnforcement `json:"enforcement"`
}

type BanSafeConnectionDetail

type BanSafeConnectionDetail struct {
	BanSafeConnection
	Warmup       BanSafeConnectionWarmup `json:"warmup"`
	Findings     []BanSafeFinding        `json:"findings"`
	LiftRequires *string                 `json:"liftRequires"`
	AppealState  string                  `json:"appealState"`
}

type BanSafeConnectionEnforcement

type BanSafeConnectionEnforcement struct {
	Rung                string   `json:"rung"`
	PreviousRung        string   `json:"previousRung"`
	TeamFloor           string   `json:"teamFloor"`
	Reason              string   `json:"reason"`
	Source              string   `json:"source"`
	ThroughputPerMinute *float64 `json:"throughputPerMinute"`
	BlocksUnsolicited   bool     `json:"blocksUnsolicited"`
	Suspended           bool     `json:"suspended"`
	StartedAt           string   `json:"startedAt"`
	EligibleLiftAt      *string  `json:"eligibleLiftAt"`
	ExitProgress        float64  `json:"exitProgress"`
	BlockingFindings    []string `json:"blockingFindings"`
	OperatorHold        bool     `json:"operatorHold"`
	AppealState         string   `json:"appealState"`
	State               string   `json:"state"`
}

type BanSafeConnectionWarmup

type BanSafeConnectionWarmup struct {
	Enabled      bool               `json:"enabled"`
	TenureSource *string            `json:"tenureSource"`
	TenureDay    int                `json:"tenureDay"`
	Allowance    *float64           `json:"allowance"`
	SentToday    *int               `json:"sentToday"`
	ResetsAt     *string            `json:"resetsAt"`
	Curve        []WarmupCurvePoint `json:"curve"`
}

type BanSafeEnforcementSummary

type BanSafeEnforcementSummary struct {
	BanSafeHealthProjection
	ConnectionID        string                        `json:"connectionId"`
	Connection          string                        `json:"connection"`
	PhoneNumber         string                        `json:"phoneNumber"`
	ProjectID           string                        `json:"projectId"`
	Rung                string                        `json:"rung"`
	PreviousRung        string                        `json:"previousRung"`
	TeamFloor           string                        `json:"teamFloor"`
	Reason              string                        `json:"reason"`
	Source              string                        `json:"source"`
	ThroughputPerMinute *float64                      `json:"throughputPerMinute"`
	BlocksUnsolicited   bool                          `json:"blocksUnsolicited"`
	Suspended           bool                          `json:"suspended"`
	Enforcement         *BanSafeConnectionEnforcement `json:"enforcement,omitempty"`
	BlockingFindings    []string                      `json:"blockingFindings"`
	StartedAt           string                        `json:"startedAt"`
	EligibleLiftAt      *string                       `json:"eligibleLiftAt"`
	LiftRequires        string                        `json:"liftRequires"`
	OperatorHold        bool                          `json:"operatorHold"`
	AppealState         string                        `json:"appealState"`
	State               string                        `json:"state"`
}

type BanSafeFinding

type BanSafeFinding struct {
	ID                  *string            `json:"id"`
	Key                 string             `json:"key"`
	Title               string             `json:"title"`
	Summary             string             `json:"summary"`
	Fix                 string             `json:"fix"`
	Status              string             `json:"status"`
	Severity            *string            `json:"severity"`
	Occurrences         int                `json:"occurrences"`
	ReopenedCount       int                `json:"reopenedCount"`
	Evidence            map[string]float64 `json:"evidence"`
	ConnectionID        string             `json:"connectionId"`
	Connection          string             `json:"connection"`
	PhoneNumber         string             `json:"phoneNumber"`
	FirstSeenAt         *string            `json:"firstSeenAt"`
	LastSeenAt          *string            `json:"lastSeenAt"`
	AcknowledgedAt      *string            `json:"acknowledgedAt"`
	AcknowledgedBy      *string            `json:"acknowledgedBy"`
	AcknowledgementNote *string            `json:"acknowledgementNote"`
	SnoozedUntil        *string            `json:"snoozedUntil"`
	ResolvedAt          *string            `json:"resolvedAt"`
	ResolveReason       *string            `json:"resolveReason"`
}

type BanSafeHealthAction

type BanSafeHealthAction struct {
	ID               string   `json:"id"`
	ConnectionID     string   `json:"connectionId"`
	Connection       string   `json:"connection"`
	ProjectID        string   `json:"projectId"`
	Mode             string   `json:"mode"`
	Action           string   `json:"action"`
	Status           string   `json:"status"`
	Health           float64  `json:"health"`
	Threshold        float64  `json:"threshold"`
	HealthSource     string   `json:"healthSource"`
	EstimatorVersion string   `json:"estimatorVersion"`
	ModelVersion     *string  `json:"modelVersion"`
	SlowDownMPS      *float64 `json:"slowDownMps"`
	EvaluatedAt      string   `json:"evaluatedAt"`
	CreatedAt        string   `json:"createdAt"`
	CompletedAt      *string  `json:"completedAt"`
	Outcome          *string  `json:"outcome"`
}

type BanSafeHealthExplanation

type BanSafeHealthExplanation struct {
	Penalties      BanSafeHealthPenalties           `json:"penalties"`
	Factors        []BanSafeHealthExplanationFactor `json:"factors"`
	MeasuredGroups []string                         `json:"measuredGroups"`
	MissingGroups  []string                         `json:"missingGroups"`
}

type BanSafeHealthExplanationFactor

type BanSafeHealthExplanationFactor struct {
	Group         string  `json:"group"`
	Key           string  `json:"key"`
	Penalty       float64 `json:"penalty"`
	ObservedValue float64 `json:"observedValue"`
	SampleSize    float64 `json:"sampleSize"`
}

type BanSafeHealthHistory

type BanSafeHealthHistory struct {
	ConnectionID string               `json:"connectionId"`
	Connection   string               `json:"connection"`
	Points       []BanSafeHealthPoint `json:"points"`
}

type BanSafeHealthPenalties

type BanSafeHealthPenalties struct {
	Conduct     float64 `json:"conduct"`
	Delivery    float64 `json:"delivery"`
	Connection  float64 `json:"connection"`
	Restriction float64 `json:"restriction"`
	Total       float64 `json:"total"`
}

type BanSafeHealthPoint

type BanSafeHealthPoint struct {
	BanSafeHealthProjection
	Band              *string `json:"band"`
	HealthEvaluatedAt string  `json:"healthEvaluatedAt"`
}

type BanSafeHealthProbabilities

type BanSafeHealthProbabilities struct {
	Healthy    float64 `json:"healthy"`
	Limited    float64 `json:"limited"`
	Restricted float64 `json:"restricted"`
	Banned     float64 `json:"banned"`
}

type BanSafeHealthProjection

type BanSafeHealthProjection struct {
	Health                  *float64                     `json:"health"`
	Band                    string                       `json:"band"`
	HealthSource            string                       `json:"healthSource"`
	HealthEstimatorVersion  *string                      `json:"healthEstimatorVersion"`
	HealthModelVersion      *string                      `json:"healthModelVersion"`
	HealthEvaluatedAt       *string                      `json:"healthEvaluatedAt"`
	HealthFeatureCoverage   *float64                     `json:"healthFeatureCoverage"`
	HealthReliability       string                       `json:"healthReliability"`
	HealthUnavailableReason *string                      `json:"healthUnavailableReason"`
	HealthProbabilities     *BanSafeHealthProbabilities  `json:"healthProbabilities"`
	MostLikelyHealthState   *string                      `json:"mostLikelyHealthState"`
	HealthExplanation       *BanSafeHealthExplanation    `json:"healthExplanation"`
	ObservedAccountState    *BanSafeObservedAccountState `json:"observedAccountState"`
}

type BanSafeHealthThresholdPayload

type BanSafeHealthThresholdPayload struct {
	ConnectionID     string  `json:"connectionId"`
	ProjectID        string  `json:"projectId"`
	Health           float64 `json:"health"`
	Threshold        float64 `json:"threshold"`
	HealthSource     string  `json:"healthSource"`
	EstimatorVersion string  `json:"estimatorVersion"`
	ModelVersion     *string `json:"modelVersion"`
	EvaluatedAt      string  `json:"evaluatedAt"`
	PolicyVersion    int64   `json:"policyVersion"`
	EpisodeID        string  `json:"episodeId"`
	ActionID         string  `json:"actionId"`
	// contains filtered or unexported fields
}

type BanSafeIncident

type BanSafeIncident struct {
	ID           string  `json:"id"`
	ConnectionID string  `json:"connectionId"`
	Connection   string  `json:"connection"`
	PhoneNumber  string  `json:"phoneNumber"`
	ProjectID    string  `json:"projectId"`
	Kind         string  `json:"kind"`
	Source       string  `json:"source"`
	Ambiguous    bool    `json:"ambiguous"`
	StartedAt    string  `json:"startedAt"`
	EndsAt       *string `json:"endsAt"`
	Resolution   string  `json:"resolution"`
	ClosedAt     *string `json:"closedAt"`
	ClosedBy     *string `json:"closedBy"`
	ClaimID      *string `json:"claimId"`
	Note         *string `json:"note"`
	ReportedBy   *string `json:"reportedBy"`
	CreatedAt    string  `json:"createdAt"`
}

type BanSafeIncidentPayload

type BanSafeIncidentPayload struct {
	ID          string  `json:"id"`
	PhoneNumber string  `json:"phoneNumber"`
	Kind        string  `json:"kind"`
	Source      string  `json:"source"`
	StartedAt   string  `json:"startedAt"`
	EndsAt      *string `json:"endsAt"`
	Belief      float64 `json:"belief"`
	Resolution  string  `json:"resolution"`
	ClaimID     *string `json:"claimId"`
	ClosedAt    *string `json:"closedAt"`
	// contains filtered or unexported fields
}

type BanSafeIncidentReceipt

type BanSafeIncidentReceipt struct {
	IncidentID   string `json:"incidentId"`
	Created      bool   `json:"created"`
	ConnectionID string `json:"connectionId"`
	Connection   string `json:"connection"`
	OccurredAt   string `json:"occurredAt"`
}

type BanSafeObservedAccountState

type BanSafeObservedAccountState struct {
	State      string `json:"state"`
	ObservedAt string `json:"observedAt"`
	Source     string `json:"source"`
}

type BanSafeRequiredFinding

type BanSafeRequiredFinding struct {
	FindingKey string `json:"findingKey"`
	Title      string `json:"title"`
	Severity   string `json:"severity"`
}

type BanSafeSignal

type BanSafeSignal struct {
	BanSafeSignalDefinition
	Measured   bool                 `json:"measured"`
	Value      BanSafeSignalValue   `json:"value"`
	SampleSize *float64             `json:"sampleSize"`
	Codes      *[]BanSafeSignalCode `json:"codes"`
}

type BanSafeSignalCode

type BanSafeSignalCode struct {
	Code  int `json:"code"`
	Count int `json:"count"`
}

type BanSafeSignalDefinition

type BanSafeSignalDefinition struct {
	Key         string `json:"key"`
	Label       string `json:"label"`
	Group       string `json:"group"`
	Kind        string `json:"kind"`
	Unit        string `json:"unit"`
	Description string `json:"description"`
}

type BanSafeSignalValue

type BanSafeSignalValue struct {
	Number    *float64
	Boolean   *bool
	Enum      *string
	Histogram []float64
}

BanSafeSignalValue retains the contract's primitive, histogram, and null variants.

func (BanSafeSignalValue) MarshalJSON

func (v BanSafeSignalValue) MarshalJSON() ([]byte, error)

func (*BanSafeSignalValue) UnmarshalJSON

func (v *BanSafeSignalValue) UnmarshalJSON(b []byte) error

type BanSafeTelemetryDetail

type BanSafeTelemetryDetail struct {
	BanSafeCollectionConnection
	Snapshot *BanSafeTelemetrySnapshot `json:"snapshot"`
}

type BanSafeTelemetrySnapshot

type BanSafeTelemetrySnapshot struct {
	BucketStart   string          `json:"bucketStart"`
	FlushedAt     string          `json:"flushedAt"`
	ReceivedAt    string          `json:"receivedAt"`
	Partial       bool            `json:"partial"`
	RecordVersion *int            `json:"recordVersion"`
	Signals       []BanSafeSignal `json:"signals"`
}

type Billing

type Billing struct {
	// contains filtered or unexported fields
}

func (*Billing) GetLimits

func (*Billing) GetPriorities

func (*Billing) GetResourceControls

func (r *Billing) GetResourceControls(ctx context.Context, scope BillingScope, id string, o ...RequestOptions) (Response[Envelope[ResourceBillingControls]], error)

func (*Billing) ListPricing

func (r *Billing) ListPricing(ctx context.Context, o ...RequestOptions) (Response[Envelope[[]TierPricing]], error)

func (*Billing) ListTransactions

func (r *Billing) ListTransactions(ctx context.Context, o ...RequestOptions) (Response[Envelope[[]BillingTransaction]], error)

func (*Billing) Retrieve

func (*Billing) Usage

type BillingBalance

type BillingBalance struct {
	BalanceCents      float64         `json:"balanceCents"`
	PreferredCurrency BillingCurrency `json:"preferredCurrency"`
}

type BillingControls

type BillingControls struct {
	LimitCredits *float64 `json:"limitCredits"`
	Priority     int      `json:"priority"`
}

type BillingCurrency

type BillingCurrency string

type BillingDailyCredits

type BillingDailyCredits struct {
	Date    string  `json:"date"`
	Credits float64 `json:"credits"`
}

type BillingLimit

type BillingLimit struct {
	Scope           BillingScope `json:"scope"`
	ResourceID      string       `json:"resourceId"`
	ProjectID       string       `json:"projectId"`
	Name            string       `json:"name"`
	LimitCredits    *float64     `json:"limitCredits"`
	SpentCredits    float64      `json:"spentCredits"`
	ReservedCredits float64      `json:"reservedCredits"`
	Revision        int64        `json:"revision"`
}

type BillingLimits

type BillingLimits struct {
	CheckedAt    string                `json:"checkedAt"`
	PeriodStart  string                `json:"periodStart"`
	PeriodEnd    string                `json:"periodEnd"`
	TodayCredits float64               `json:"todayCredits"`
	MonthCredits float64               `json:"monthCredits"`
	Daily        []BillingDailyCredits `json:"daily"`
	Budgets      []BillingLimit        `json:"budgets"`
}

type BillingPriorities

type BillingPriorities struct {
	Revision    int64                     `json:"revision"`
	Projects    []BillingPriority         `json:"projects"`
	Customers   []BillingResourcePriority `json:"customers"`
	Connections []BillingResourcePriority `json:"connections"`
}

type BillingPriority

type BillingPriority struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Priority int    `json:"priority"`
}

type BillingReadParams

type BillingReadParams struct {
	ProjectID string
	Scope     string
}

type BillingReorderResource

type BillingReorderResource struct {
	Scope      BillingScope `json:"scope"`
	ResourceID string       `json:"resourceId"`
}

type BillingResourcePriority

type BillingResourcePriority struct {
	BillingPriority
	ProjectID string `json:"projectId"`
}

type BillingSavedResult

type BillingSavedResult struct {
	Saved bool `json:"saved"`
}

type BillingScope

type BillingScope string
const (
	BillingProject    BillingScope = "project"
	BillingCustomer   BillingScope = "customer"
	BillingConnection BillingScope = "connection"
)

type BillingTransaction

type BillingTransaction struct {
	ID                string  `json:"id"`
	AmountCents       float64 `json:"amountCents"`
	BalanceAfterCents float64 `json:"balanceAfterCents"`
	Type              string  `json:"type"`
	Description       string  `json:"description"`
	ConnectionID      *string `json:"connectionId"`
	ProjectID         *string `json:"projectId"`
	Tier              *string `json:"tier"`
	Currency          *string `json:"currency"`
	PaymentStatus     string  `json:"paymentStatus"`
	CreatedAt         int64   `json:"createdAt"`
}

type BillingUsage

type BillingUsage struct {
	ActiveConnections int64   `json:"activeConnections"`
	TotalChargedCents float64 `json:"totalChargedCents"`
}

type BlocklistUpdatePayload

type BlocklistUpdatePayload struct {
	Action  string                   `json:"action"`
	Changes []WebhookBlocklistChange `json:"changes"`
	// contains filtered or unexported fields
}

type Boleto

type Boleto struct {
	DigitableLine string `json:"digitableLine"`
}

type BridgeClient

type BridgeClient struct {
	// contains filtered or unexported fields
}

func NewBridgeClient

func NewBridgeClient(c Config) (*BridgeClient, error)

func (*BridgeClient) Resolve

type BridgeRoute

type BridgeRoute struct {
	WSURL     string `json:"wsUrl"`
	Region    string `json:"region"`
	Kind      string `json:"kind"`
	Signal    string `json:"signal"`
	TokenKind string `json:"tokenKind"`
	ExpiresAt int64  `json:"expiresAt"`
}

type Business

type Business struct {
	// contains filtered or unexported fields
}

func (*Business) CreateCatalog

func (*Business) DeleteCollection

func (*Business) DeleteCoverPhoto

func (*Business) DeleteProduct

func (*Business) GetCollection

func (*Business) GetEligibility

func (*Business) GetLinkedAccounts

func (r *Business) GetLinkedAccounts(ctx context.Context, s string, o ...RequestOptions) (Response[Envelope[BusinessLinkedAccounts]], error)

func (*Business) GetMerchantCompliance

func (r *Business) GetMerchantCompliance(ctx context.Context, s string, o ...RequestOptions) (Response[Envelope[BusinessMerchantCompliance]], error)

func (*Business) GetProduct

func (r *Business) GetProduct(ctx context.Context, s, id, businessID string, o ...RequestOptions) (Response[Envelope[BusinessProduct]], error)

func (*Business) GetProfile

func (*Business) SetCartEnabled

func (r *Business) SetCartEnabled(ctx context.Context, s string, enabled bool, o ...RequestOptions) (Response[Envelope[AsyncResult[BusinessActionSuccess]]], error)

func (*Business) SetProductVisibility

func (r *Business) SetProductVisibility(ctx context.Context, s, id string, hidden bool, o ...RequestOptions) (Response[Envelope[AsyncResult[BusinessActionSuccess]]], error)

type BusinessActionSuccess

type BusinessActionSuccess struct {
	Success bool `json:"success"`
}

type BusinessAdStatus

type BusinessAdStatus struct {
	HasActiveCTWAAd bool `json:"hasActiveCTWAAd"`
	HasCreatedAd    bool `json:"hasCreatedAd"`
}

type BusinessCatalogAppealRequest

type BusinessCatalogAppealRequest struct {
	Reason string `json:"reason"`
}

type BusinessCatalogPage

type BusinessCatalogPage struct {
	Next     string            `json:"next,omitempty"`
	Previous string            `json:"previous,omitempty"`
	Products []BusinessProduct `json:"products"`
}

type BusinessCatalogParams

type BusinessCatalogParams struct {
	ID, After            string
	Limit, Width, Height int
}

type BusinessCollection

type BusinessCollection struct {
	ID       string                   `json:"id"`
	Name     string                   `json:"name"`
	Products []BusinessProduct        `json:"products"`
	Status   BusinessCollectionStatus `json:"status"`
}

type BusinessCollectionCreateRequest

type BusinessCollectionCreateRequest struct {
	Name       string   `json:"name"`
	ProductIDs []string `json:"productIds"`
}

type BusinessCollectionMove

type BusinessCollectionMove struct {
	CollectionID string `json:"collectionId"`
	FromIndex    int    `json:"fromIndex"`
	ToIndex      int    `json:"toIndex"`
}

type BusinessCollectionMutationResult

type BusinessCollectionMutationResult struct {
	ID           string `json:"id"`
	ReviewStatus string `json:"reviewStatus"`
}

type BusinessCollectionPage

type BusinessCollectionPage struct {
	Next        string               `json:"next,omitempty"`
	Collections []BusinessCollection `json:"collections"`
}

type BusinessCollectionParams

type BusinessCollectionParams = BusinessCatalogParams

type BusinessCollectionReorderRequest

type BusinessCollectionReorderRequest struct {
	Moves []BusinessCollectionMove `json:"moves"`
}

type BusinessCollectionStatus

type BusinessCollectionStatus struct {
	Status       string `json:"status,omitempty"`
	CanAppeal    bool   `json:"canAppeal"`
	CommerceURL  string `json:"commerceUrl,omitempty"`
	RejectReason string `json:"rejectReason,omitempty"`
}

type BusinessCollectionUpdateRequest

type BusinessCollectionUpdateRequest struct {
	Name             *string   `json:"name,omitempty"`
	AddProductIDs    *[]string `json:"addProductIds,omitempty"`
	RemoveProductIDs *[]string `json:"removeProductIds,omitempty"`
}

type BusinessCollectionsParams

type BusinessCollectionsParams struct {
	ID, After                                 string
	CollectionLimit, ItemLimit, Width, Height int
}

type BusinessCoverPhotoResult

type BusinessCoverPhotoResult struct {
	CoverPhotoID string `json:"coverPhotoId"`
}

type BusinessDimensions

type BusinessDimensions struct {
	Width  *int `json:"width,omitempty"`
	Height *int `json:"height,omitempty"`
}

type BusinessEligibility

type BusinessEligibility struct {
	Features []BusinessFeatureEligibility `json:"features"`
}

type BusinessFacebookBusiness

type BusinessFacebookBusiness struct {
	ID           string `json:"id"`
	DisplayName  string `json:"displayName"`
	CatalogID    string `json:"catalogId,omitempty"`
	CatalogState string `json:"catalogState,omitempty"`
}

type BusinessFacebookPage

type BusinessFacebookPage struct {
	BusinessAdStatus
	ID                   string `json:"id"`
	DisplayName          string `json:"displayName"`
	ProfileSync          string `json:"profileSync,omitempty"`
	ProfilePictureURL    string `json:"profilePictureUrl"`
	ShowOnProfile        bool   `json:"showOnProfile"`
	WhatsAppAsPageButton bool   `json:"whatsAppAsPageButton"`
}

type BusinessFeatureEligibility

type BusinessFeatureEligibility struct {
	Feature                           string   `json:"feature"`
	Status                            string   `json:"status"`
	Expiration                        *float64 `json:"expiration,omitempty"`
	AdditionalParams                  string   `json:"additionalParams,omitempty"`
	ShowPrivacyInterstitialToNewUsers *bool    `json:"showPrivacyInterstitialToNewUsers,omitempty"`
	V1Enabled                         *bool    `json:"v1Enabled,omitempty"`
}

type BusinessGrievanceOfficer

type BusinessGrievanceOfficer struct {
	BusinessMerchantContact
	Name string `json:"name"`
}

type BusinessImporterAddress

type BusinessImporterAddress struct {
	Street1     string `json:"street1,omitempty"`
	Street2     string `json:"street2,omitempty"`
	City        string `json:"city,omitempty"`
	Region      string `json:"region,omitempty"`
	PostalCode  string `json:"postalCode,omitempty"`
	CountryCode string `json:"countryCode,omitempty"`
}

type BusinessInstagramProfessional

type BusinessInstagramProfessional struct {
	Handle            string `json:"handle"`
	DisplayName       string `json:"displayName"`
	ProfilePictureURL string `json:"profilePictureUrl"`
	ShowOnProfile     bool   `json:"showOnProfile"`
}

type BusinessLinkedAccounts

type BusinessLinkedAccounts struct {
	FacebookPage          *BusinessFacebookPage          `json:"facebookPage,omitempty"`
	FacebookBusiness      *BusinessFacebookBusiness      `json:"facebookBusiness,omitempty"`
	InstagramProfessional *BusinessInstagramProfessional `json:"instagramProfessional,omitempty"`
	WhatsAppAdIdentity    *BusinessWhatsAppAdIdentity    `json:"whatsAppAdIdentity,omitempty"`
}

type BusinessMerchantCompliance

type BusinessMerchantCompliance struct {
	EntityName       string                   `json:"entityName"`
	EntityType       string                   `json:"entityType"`
	IsRegistered     bool                     `json:"isRegistered"`
	EntityTypeCustom string                   `json:"entityTypeCustom"`
	CustomerCare     BusinessMerchantContact  `json:"customerCare"`
	GrievanceOfficer BusinessGrievanceOfficer `json:"grievanceOfficer"`
}

type BusinessMerchantContact

type BusinessMerchantContact struct {
	Email          string `json:"email"`
	LandlineNumber string `json:"landlineNumber"`
	MobileNumber   string `json:"mobileNumber"`
}

type BusinessOrder

type BusinessOrder struct {
	ID        string                 `json:"id"`
	CreatedAt float64                `json:"createdAt"`
	CatalogID string                 `json:"catalogId,omitempty"`
	Price     BusinessOrderPrice     `json:"price"`
	Products  []BusinessOrderProduct `json:"products"`
}

type BusinessOrderLookupRequest

type BusinessOrderLookupRequest struct {
	Token string `json:"token"`
}

func (BusinessOrderLookupRequest) GoString

func (b BusinessOrderLookupRequest) GoString() string

func (BusinessOrderLookupRequest) String

type BusinessOrderPrice

type BusinessOrderPrice struct {
	Subtotal    string `json:"subtotal"`
	Total       string `json:"total"`
	Currency    string `json:"currency"`
	PriceStatus string `json:"priceStatus,omitempty"`
}

type BusinessOrderProduct

type BusinessOrderProduct struct {
	ID                string  `json:"id"`
	Price             string  `json:"price"`
	Currency          string  `json:"currency"`
	Name              string  `json:"name"`
	Quantity          float64 `json:"quantity"`
	ImageID           string  `json:"imageId,omitempty"`
	ImageURL          string  `json:"imageUrl,omitempty"`
	VariantProperties string  `json:"variantProperties,omitempty"`
}

type BusinessProduct

type BusinessProduct struct {
	ID                 string                     `json:"id"`
	Name               string                     `json:"name"`
	Price              string                     `json:"price"`
	Currency           string                     `json:"currency"`
	Hidden             bool                       `json:"hidden"`
	Sanctioned         bool                       `json:"sanctioned"`
	Media              BusinessProductMedia       `json:"media"`
	Status             BusinessProductStatus      `json:"status"`
	RetailerID         string                     `json:"retailerId,omitempty"`
	BelongsTo          string                     `json:"belongsTo,omitempty"`
	Description        string                     `json:"description,omitempty"`
	URL                string                     `json:"url,omitempty"`
	ShimmedURL         string                     `json:"shimmedUrl,omitempty"`
	MaxAvailable       *float64                   `json:"maxAvailable,omitempty"`
	Availability       string                     `json:"availability,omitempty"`
	ComplianceCategory string                     `json:"complianceCategory,omitempty"`
	Compliance         *BusinessProductCompliance `json:"compliance,omitempty"`
	SalePrice          *BusinessSalePrice         `json:"salePrice,omitempty"`
	Variant            *BusinessProductVariant    `json:"variant,omitempty"`
}

type BusinessProductCompliance

type BusinessProductCompliance struct {
	CountryCodeOrigin string                   `json:"countryCodeOrigin,omitempty"`
	ImporterName      string                   `json:"importerName,omitempty"`
	ImporterAddress   *BusinessImporterAddress `json:"importerAddress,omitempty"`
}

type BusinessProductDeleteResult

type BusinessProductDeleteResult struct {
	DeletedCount int `json:"deletedCount"`
}

type BusinessProductImage

type BusinessProductImage struct {
	ID          string `json:"id"`
	OriginalURL string `json:"originalUrl,omitempty"`
	RequestURL  string `json:"requestUrl,omitempty"`
}

type BusinessProductImageSource

type BusinessProductImageSource struct {
	URL      string `json:"url,omitempty"`
	Base64   string `json:"base64,omitempty"`
	MediaURL string `json:"mediaUrl,omitempty"`
}

type BusinessProductMedia

type BusinessProductMedia struct {
	Images []BusinessProductImage `json:"images"`
	Videos []BusinessProductVideo `json:"videos"`
}

type BusinessProductMutationRequest

type BusinessProductMutationRequest struct {
	Name               string                       `json:"name"`
	Description        *string                      `json:"description,omitempty"`
	Currency           string                       `json:"currency,omitempty"`
	Price              string                       `json:"price,omitempty"`
	SalePrice          string                       `json:"salePrice,omitempty"`
	URL                string                       `json:"url,omitempty"`
	RetailerID         *string                      `json:"retailerId,omitempty"`
	Hidden             *bool                        `json:"hidden,omitempty"`
	Images             []BusinessProductImageSource `json:"images"`
	VideoURLs          []string                     `json:"videoUrls,omitempty"`
	ComplianceCategory string                       `json:"complianceCategory,omitempty"`
	Compliance         *BusinessProductCompliance   `json:"compliance,omitempty"`
	Width              int                          `json:"width,omitempty"`
	Height             int                          `json:"height,omitempty"`
}

type BusinessProductStatus

type BusinessProductStatus struct {
	Status    string `json:"status,omitempty"`
	CanAppeal bool   `json:"canAppeal"`
}

type BusinessProductVariant

type BusinessProductVariant struct {
	Availability   BusinessVariantAvailability `json:"availability"`
	ListingDetails BusinessVariantListing      `json:"listingDetails"`
	Types          []BusinessVariantType       `json:"types"`
	Properties     []BusinessVariantProperty   `json:"properties"`
}

type BusinessProductVideo

type BusinessProductVideo struct {
	ID           string `json:"id"`
	OriginalURL  string `json:"originalUrl,omitempty"`
	ThumbnailURL string `json:"thumbnailUrl,omitempty"`
}

type BusinessProfile

type BusinessProfile struct {
	ConversationReference
	Address       string                    `json:"address"`
	Email         string                    `json:"email"`
	Description   string                    `json:"description"`
	Websites      []string                  `json:"websites"`
	CoverPhotoID  string                    `json:"coverPhotoId"`
	Categories    []BusinessProfileCategory `json:"categories"`
	Options       map[string]string         `json:"options"`
	HoursTimeZone string                    `json:"hoursTimeZone"`
	Hours         []BusinessProfileHours    `json:"hours"`
}

type BusinessProfileCategory

type BusinessProfileCategory struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type BusinessProfileDay

type BusinessProfileDay struct {
	DayOfWeek string `json:"dayOfWeek"`
	Mode      string `json:"mode"`
	OpenTime  *int   `json:"openTime,omitempty"`
	CloseTime *int   `json:"closeTime,omitempty"`
}

BusinessProfileDay represents one schedule entry. OpenTime and CloseTime are minutes after midnight and are present only for specific_hours.

type BusinessProfileHours

type BusinessProfileHours struct {
	DayOfWeek string `json:"dayOfWeek"`
	Mode      string `json:"mode"`
	OpenTime  string `json:"openTime"`
	CloseTime string `json:"closeTime"`
}

type BusinessProfileHoursUpdate

type BusinessProfileHoursUpdate struct {
	TimeZone string               `json:"timeZone"`
	Days     []BusinessProfileDay `json:"days"`
}

type BusinessProfileStatus

type BusinessProfileStatus struct {
	Status string `json:"status"`
}

type BusinessProfileUpdateRequest

type BusinessProfileUpdateRequest struct {
	Address     *string                     `json:"address,omitempty"`
	Email       *string                     `json:"email,omitempty"`
	Description *string                     `json:"description,omitempty"`
	Websites    *[]string                   `json:"websites,omitempty"`
	Hours       *BusinessProfileHoursUpdate `json:"hours,omitempty"`
}

type BusinessQuickReplyUpdatePayload

type BusinessQuickReplyUpdatePayload struct {
	ID                 string   `json:"id"`
	Shortcut           string   `json:"shortcut"`
	Message            string   `json:"message"`
	Keywords           []string `json:"keywords"`
	Count              int      `json:"count"`
	Deleted            bool     `json:"deleted"`
	AssociatedLabelIDs []string `json:"associatedLabelIds"`
	ObservedAt         int64    `json:"observedAt"`
	FromFullSync       bool     `json:"fromFullSync"`
	// contains filtered or unexported fields
}

type BusinessSalePrice

type BusinessSalePrice struct {
	Price     string `json:"price"`
	StartDate string `json:"startDate,omitempty"`
	EndDate   string `json:"endDate,omitempty"`
}

type BusinessVariantAvailability

type BusinessVariantAvailability struct {
	Listings []BusinessVariantAvailabilityItem `json:"listings"`
}

type BusinessVariantAvailabilityItem

type BusinessVariantAvailabilityItem struct {
	ProductID string                    `json:"productId,omitempty"`
	Available bool                      `json:"available"`
	Options   []BusinessVariantProperty `json:"options"`
}

type BusinessVariantListing

type BusinessVariantListing struct {
	Description string `json:"description,omitempty"`
	LowestPrice string `json:"lowestPrice,omitempty"`
	MultiPrice  string `json:"multiPrice,omitempty"`
}

type BusinessVariantOption

type BusinessVariantOption struct {
	Value     string                    `json:"value"`
	Thumbnail *BusinessVariantThumbnail `json:"thumbnail,omitempty"`
}

type BusinessVariantProperty

type BusinessVariantProperty struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type BusinessVariantThumbnail

type BusinessVariantThumbnail struct {
	ID                 string             `json:"id,omitempty"`
	OriginalURL        string             `json:"originalUrl,omitempty"`
	RequestURL         string             `json:"requestUrl,omitempty"`
	OriginalDimensions BusinessDimensions `json:"originalDimensions"`
}

type BusinessVariantType

type BusinessVariantType struct {
	Name    string                  `json:"name"`
	Options []BusinessVariantOption `json:"options"`
}

type BusinessWhatsAppAdIdentity

type BusinessWhatsAppAdIdentity struct {
	BusinessAdStatus
	ID string `json:"id"`
}

type ButtonsContent

type ButtonsContent struct {
	Media   *ButtonsMedia   `json:"media,omitempty"`
	Title   string          `json:"title,omitempty"`
	Body    string          `json:"body"`
	Footer  string          `json:"footer,omitempty"`
	Buttons []MessageButton `json:"buttons"`
}

type ButtonsMedia

type ButtonsMedia struct {
	InteractiveMediaSource
	Type      string  `json:"type"`
	Filename  *string `json:"filename,omitempty"`
	Thumbnail *string `json:"thumbnail,omitempty"`
}

type Call

type Call struct {
	// contains filtered or unexported fields
}

func (*Call) AddParticipant

func (c *Call) AddParticipant(ctx context.Context, to string) (CallParticipant, error)

func (*Call) AdmitParticipant

func (c *Call) AdmitParticipant(ctx context.Context, id string) error

func (*Call) Answer

func (c *Call) Answer(ctx context.Context, b AcceptCallRequest) error

func (*Call) ConnectionID

func (c *Call) ConnectionID() string

func (*Call) DenyParticipant

func (c *Call) DenyParticipant(ctx context.Context, id string) error

func (*Call) Done

func (c *Call) Done() <-chan struct{}

func (*Call) Duration

func (c *Call) Duration() time.Duration

func (*Call) End

func (c *Call) End(ctx context.Context) error

func (*Call) Events

func (c *Call) Events() <-chan CallEvent

func (*Call) ID

func (c *Call) ID() string

func (*Call) Join

func (c *Call) Join(ctx context.Context, video *bool) error

func (*Call) Leave

func (c *Call) Leave(ctx context.Context) error

func (*Call) Reject

func (c *Call) Reject(ctx context.Context) error

func (*Call) ReportError

func (c *Call) ReportError(code string)

func (*Call) ReportQuality

func (c *Call) ReportQuality(q CallQuality)

func (*Call) RingParticipant

func (c *Call) RingParticipant(ctx context.Context, to string) error

func (*Call) SendReaction

func (c *Call) SendReaction(ctx context.Context, emoji string) error

func (*Call) SetApprovalRequired

func (c *Call) SetApprovalRequired(ctx context.Context, enabled bool) error

func (*Call) SetHandRaised

func (c *Call) SetHandRaised(ctx context.Context, raised bool) error

func (*Call) SetMediaState

func (c *Call) SetMediaState(ctx context.Context, a, v, screen *bool) error

func (*Call) Snapshot

func (c *Call) Snapshot() CallSnapshot

func (*Call) WriteAudio

func (c *Call) WriteAudio(ctx context.Context, pcm []int16) error

func (*Call) WriteVideo

func (c *Call) WriteVideo(ctx context.Context, frame VideoFrame) error

type CallAcceptedPayload

type CallAcceptedPayload struct {
	From             WebhookIdentity          `json:"from"`
	CallID           string                   `json:"callId"`
	AnsweredBy       string                   `json:"answeredBy,omitempty"`
	Exclusive        *bool                    `json:"exclusive,omitempty"`
	ConnectionMethod string                   `json:"connectionMethod,omitempty"`
	Capabilities     *WebhookCallCapabilities `json:"capabilities,omitempty"`
	// contains filtered or unexported fields
}

type CallBusinessAppQuality

type CallBusinessAppQuality struct {
	MeasuredCalls   int64    `json:"measuredCalls"`
	AverageJitterMS *float64 `json:"averageJitterMs"`
	AverageRTTMS    *float64 `json:"averageRttMs"`
	PacketLossRate  *float64 `json:"packetLossRate"`
	Reconnects      *int64   `json:"reconnects"`
}

type CallBusinessCodeCount

type CallBusinessCodeCount struct {
	Code  string `json:"code"`
	Count int64  `json:"count"`
}

type CallBusinessDirections

type CallBusinessDirections struct {
	Inbound  CallOutcomeMetrics `json:"inbound"`
	Outbound CallOutcomeMetrics `json:"outbound"`
}

type CallBusinessFollowUp

type CallBusinessFollowUp struct {
	EligibleMissed    int64    `json:"eligibleMissed"`
	ReturnedWithin24H int64    `json:"returnedWithin24h"`
	Rate              *float64 `json:"rate"`
	AverageDelayMS    *float64 `json:"averageDelayMs"`
	PendingWindow     int64    `json:"pendingWindow"`
	UnknownContact    int64    `json:"unknownContact"`
}

type CallBusinessMediaQuality

type CallBusinessMediaQuality struct {
	MeasuredCalls   int64    `json:"measuredCalls"`
	AverageJitterMS *float64 `json:"averageJitterMs"`
	AverageRTTMS    *float64 `json:"averageRttMs"`
	PacketsLost     *float64 `json:"packetsLost"`
}

type CallBusinessMetrics

type CallBusinessMetrics struct {
	CallOutcomeMetrics
	Directions            CallBusinessDirections   `json:"directions"`
	MediaQuality          CallBusinessMediaQuality `json:"mediaQuality"`
	AppQuality            CallBusinessAppQuality   `json:"appQuality"`
	EndReasons            []CallBusinessCodeCount  `json:"endReasons"`
	AppErrors             []CallBusinessCodeCount  `json:"appErrors"`
	Transports            []CallBusinessCodeCount  `json:"transports"`
	MultiParticipantCalls int64                    `json:"multiParticipantCalls"`
	FollowUp              CallBusinessFollowUp     `json:"followUp"`
}

type CallCapabilities

type CallCapabilities struct {
	Video  bool `json:"video"`
	Invite bool `json:"invite"`
}

type CallCheck

type CallCheck struct {
	Allowed    bool                 `json:"allowed"`
	Refusal    *string              `json:"refusal"`
	Permission *CallPermissionState `json:"permission"`
}

type CallClaim

type CallClaim struct {
	Answered       bool
	AnsweredBy     string
	Exclusive      bool
	ClaimedByOther bool
	CanJoin        bool
}

type CallConnectionJoinedPayload

type CallConnectionJoinedPayload struct {
	CallID     string                `json:"callId"`
	Connection WebhookCallConnection `json:"connection"`
	// contains filtered or unexported fields
}

type CallConnectionLeftPayload

type CallConnectionLeftPayload struct {
	CallID       string `json:"callId"`
	ConnectionID string `json:"connectionId"`
	Participant  string `json:"participant"`
	Reason       string `json:"reason"`
	// contains filtered or unexported fields
}

type CallEndedPayload

type CallEndedPayload struct {
	From             *WebhookIdentity `json:"from"`
	CallID           string           `json:"callId"`
	DurationSeconds  float64          `json:"durationSeconds"`
	Reason           string           `json:"reason"`
	Direction        string           `json:"direction"`
	HadVideo         bool             `json:"hadVideo"`
	ConnectionMethod string           `json:"connectionMethod,omitempty"`
	// contains filtered or unexported fields
}

type CallEvent

type CallEvent struct {
	Type    string
	Audio   []int16
	Video   *VideoFrame
	Control *MediaControlFrame
	Error   error
	Reason  string
}

type CallFilters

type CallFilters struct{ ProjectID, ConnectionID, Direction, Upstream, Outcome, Since, Until string }

type CallMissedPayload

type CallMissedPayload struct {
	From   WebhookIdentity `json:"from"`
	CallID string          `json:"callId"`
	Reason string          `json:"reason"`
	// contains filtered or unexported fields
}

type CallOptOut

type CallOptOut struct {
	ID          string  `json:"id"`
	PhoneNumber *string `json:"phoneNumber"`
	BSUID       *string `json:"bsuid"`
	Note        *string `json:"note"`
	Source      string  `json:"source"`
	CreatedAt   string  `json:"createdAt"`
}

type CallOptOutDeleted

type CallOptOutDeleted struct {
	ID      string `json:"id"`
	Deleted bool   `json:"deleted"`
}

type CallOptOutImportResult

type CallOptOutImportResult struct {
	Added    int                   `json:"added"`
	Existing int                   `json:"existing"`
	Rejected []CallOptOutRejection `json:"rejected"`
}

type CallOptOutRejection

type CallOptOutRejection struct {
	Index  int    `json:"index"`
	Reason string `json:"reason"`
}

type CallOptOuts

type CallOptOuts struct {
	// contains filtered or unexported fields
}

func (*CallOptOuts) Create

func (*CallOptOuts) Delete

func (*CallOptOuts) List

type CallOutcomeMetrics

type CallOutcomeMetrics struct {
	Total              int64    `json:"total"`
	Answered           int64    `json:"answered"`
	Missed             int64    `json:"missed"`
	Declined           int64    `json:"declined"`
	Failed             int64    `json:"failed"`
	Ringing            int64    `json:"ringing"`
	AnswerRate         *float64 `json:"answerRate"`
	TalkSeconds        float64  `json:"talkSeconds"`
	TimedAnswered      int64    `json:"timedAnswered"`
	TimedPickup        int64    `json:"timedPickup"`
	AverageTalkSeconds *float64 `json:"averageTalkSeconds"`
	MedianTalkSeconds  *float64 `json:"medianTalkSeconds"`
	P95TalkSeconds     *float64 `json:"p95TalkSeconds"`
	AveragePickupMS    *float64 `json:"averagePickupMs"`
	P95PickupMS        *float64 `json:"p95PickupMs"`
	ShortAnswered      int64    `json:"shortAnswered"`
	Video              int64    `json:"video"`
}

type CallParticipant

type CallParticipant struct {
	Guest       *bool  `json:"guest,omitempty"`
	Name        string `json:"name,omitempty"`
	HandRaised  *bool  `json:"handRaised,omitempty"`
	ID          string `json:"id"`
	PhoneNumber string `json:"phoneNumber,omitempty"`
	BSUID       string `json:"bsuid,omitempty"`
	Username    string `json:"username,omitempty"`
	AudioMuted  bool   `json:"audioMuted"`
	Video       bool   `json:"video"`
	State       string `json:"state"`
}

type CallParticipantLeftPayload

type CallParticipantLeftPayload struct {
	CallID        string `json:"callId"`
	ParticipantID string `json:"participantId"`
	Reason        string `json:"reason,omitempty"`
	// contains filtered or unexported fields
}

type CallParticipantPayload

type CallParticipantPayload struct {
	CallID      string                 `json:"callId"`
	Participant WebhookCallParticipant `json:"participant"`
	// contains filtered or unexported fields
}

type CallPeer

type CallPeer struct {
	ID          string `json:"id,omitempty"`
	PhoneNumber string `json:"phoneNumber,omitempty"`
	Username    string `json:"username,omitempty"`
}

CallPeer is the other party on a call: user ID, phone number or username, as the call reported them.

type CallPermission

type CallPermission struct {
	CallPermissionState
	Conversation ConversationReference `json:"conversation"`
}

type CallPermissionAction

type CallPermissionAction struct {
	Allowed bool                  `json:"allowed"`
	Limits  []CallPermissionLimit `json:"limits"`
}

type CallPermissionChangedPayload

type CallPermissionChangedPayload struct {
	Conversation   WebhookIdentity `json:"conversation"`
	Status         string          `json:"status"`
	PreviousStatus string          `json:"previousStatus"`
	ExpiresAt      *string         `json:"expiresAt"`
	Source         string          `json:"source"`
	ChangedAt      string          `json:"changedAt"`
	// contains filtered or unexported fields
}

type CallPermissionLimit

type CallPermissionLimit struct {
	Period     string  `json:"period"`
	MaxAllowed int     `json:"maxAllowed"`
	Used       int     `json:"used"`
	ResetsAt   *string `json:"resetsAt"`
}

type CallPermissionRequestContent

type CallPermissionRequestContent struct {
	Body string `json:"body"`
}

type CallPermissionState

type CallPermissionState struct {
	Status    string  `json:"status"`
	ExpiresAt *string `json:"expiresAt"`
	Source    *string `json:"source"`
	UpdatedAt *string `json:"updatedAt"`
	CheckedAt *string `json:"checkedAt"`
	Fresh     bool    `json:"fresh"`
	Actions   *struct {
		RequestPermission *CallPermissionAction `json:"requestPermission"`
		StartCall         *CallPermissionAction `json:"startCall"`
	} `json:"actions"`
}

type CallPolicy

type CallPolicy struct {
	BlockedCountryCodes []string `json:"blockedCountryCodes"`
	OptOutCount         int      `json:"optOutCount"`
	Revision            int64    `json:"revision"`
	UpdatedAt           *string  `json:"updatedAt"`
}

type CallPolicyResource

type CallPolicyResource struct {
	// contains filtered or unexported fields
}

func (*CallPolicyResource) Retrieve

func (*CallPolicyResource) Update

type CallQuality

type CallQuality struct {
	RTTMS           *int   `json:"rttMs,omitempty"`
	JitterMS        *int   `json:"jitterMs,omitempty"`
	PacketsLost     *int64 `json:"packetsLost,omitempty"`
	PacketsReceived *int64 `json:"packetsReceived,omitempty"`
	AudioCodec      string `json:"audioCodec,omitempty"`
	VideoCodec      string `json:"videoCodec,omitempty"`
	CandidateType   string `json:"candidateType,omitempty"`
	Reconnects      *int   `json:"reconnects,omitempty"`
}

type CallReactionRequest

type CallReactionRequest struct {
	ConnectionID string `json:"connectionId"`
	Participant  string `json:"participant,omitempty"`
	Emoji        string `json:"emoji"`
}

type CallReceivedPayload

type CallReceivedPayload struct {
	From             WebhookIdentity          `json:"from"`
	CallID           string                   `json:"callId"`
	HasVideo         bool                     `json:"hasVideo"`
	ConnectionMethod string                   `json:"connectionMethod,omitempty"`
	Capabilities     *WebhookCallCapabilities `json:"capabilities,omitempty"`
	// contains filtered or unexported fields
}

type CallRecord

type CallRecord struct {
	CallID          string   `json:"callId"`
	ProjectID       *string  `json:"projectId"`
	ConnectionID    string   `json:"connectionId"`
	Direction       string   `json:"direction"`
	Upstream        string   `json:"upstream"`
	Outcome         string   `json:"outcome"`
	State           string   `json:"state"`
	HasVideo        bool     `json:"hasVideo"`
	PeerRef         *string  `json:"peerRef"`
	StartedAt       string   `json:"startedAt"`
	ConnectedAt     *string  `json:"connectedAt"`
	EndedAt         *string  `json:"endedAt"`
	DurationSeconds *float64 `json:"durationSeconds"`
	EndReason       *string  `json:"endReason"`
}

type CallRecordAppConnection

type CallRecordAppConnection struct {
	ConnectionID string                `json:"connectionId"`
	Participant  string                `json:"participant"`
	Client       *CallReportClient     `json:"client"`
	Quality      *CallRecordAppQuality `json:"quality"`
	Errors       []CallRecordAppError  `json:"errors"`
}

type CallRecordAppError

type CallRecordAppError struct {
	Code       string `json:"code"`
	ReportedAt string `json:"reportedAt"`
}

type CallRecordAppQuality

type CallRecordAppQuality struct {
	ReportedAt      string   `json:"reportedAt"`
	RTTMS           *float64 `json:"rttMs"`
	JitterMS        *float64 `json:"jitterMs"`
	PacketsLost     *float64 `json:"packetsLost"`
	PacketsReceived *float64 `json:"packetsReceived"`
	AudioCodec      *string  `json:"audioCodec"`
	VideoCodec      *string  `json:"videoCodec"`
	CandidateType   *string  `json:"candidateType"`
	Reconnects      *int     `json:"reconnects"`
}

type CallRecordAppReports

type CallRecordAppReports struct {
	Status      string                    `json:"status"`
	Connections []CallRecordAppConnection `json:"connections"`
	Truncated   bool                      `json:"truncated"`
}

type CallRecordConnection

type CallRecordConnection struct {
	ID          string  `json:"id"`
	Participant string  `json:"participant"`
	Transport   string  `json:"transport"`
	JoinedAt    *string `json:"joinedAt"`
	LeftAt      *string `json:"leftAt"`
	Reason      *string `json:"reason"`
}

type CallRecordCorrelation

type CallRecordCorrelation struct {
	CallID       string `json:"callId"`
	ConnectionID string `json:"connectionId"`
}

type CallRecordDetail

type CallRecordDetail struct {
	Call         CallRecordSummary       `json:"call"`
	Participants []CallRecordParticipant `json:"participants"`
	Connections  []CallRecordConnection  `json:"connections"`
	Telemetry    CallRecordTelemetry     `json:"telemetry"`
	AppReports   CallRecordAppReports    `json:"appReports"`
	History      CallRecordHistory       `json:"history"`
	Correlation  CallRecordCorrelation   `json:"correlation"`
}

type CallRecordEndReason

type CallRecordEndReason struct {
	Code  string `json:"code"`
	Label string `json:"label"`
}

type CallRecordEvent

type CallRecordEvent struct {
	EventID    string `json:"eventId"`
	Type       string `json:"type"`
	OccurredAt string `json:"occurredAt"`
}

type CallRecordExportPage

type CallRecordExportPage struct {
	Format     string
	Body       string
	NextCursor *string
}

type CallRecordHistory

type CallRecordHistory struct {
	Events    []CallRecordEvent `json:"events"`
	Truncated bool              `json:"truncated"`
}

type CallRecordParticipant

type CallRecordParticipant struct {
	ID          string  `json:"id"`
	State       string  `json:"state"`
	FirstSeenAt string  `json:"firstSeenAt"`
	UpdatedAt   string  `json:"updatedAt"`
	LeftReason  *string `json:"leftReason"`
}

type CallRecordSummary

type CallRecordSummary struct {
	CallID          string               `json:"callId"`
	ConnectionID    string               `json:"connectionId"`
	ProjectID       *string              `json:"projectId"`
	Direction       string               `json:"direction"`
	State           string               `json:"state"`
	Live            bool                 `json:"live"`
	Backend         string               `json:"backend"`
	HasVideo        bool                 `json:"hasVideo"`
	PeerRef         *string              `json:"peerRef"`
	StartedAt       string               `json:"startedAt"`
	ConnectedAt     *string              `json:"connectedAt"`
	EndedAt         *string              `json:"endedAt"`
	DurationSeconds *float64             `json:"durationSeconds"`
	EndReason       *CallRecordEndReason `json:"endReason"`
	AnsweredBy      *string              `json:"answeredBy"`
	Exclusive       *bool                `json:"exclusive"`
}

type CallRecordTelemetry

type CallRecordTelemetry struct {
	Status       string   `json:"status"`
	Source       string   `json:"source"`
	SetupMS      *float64 `json:"setupMs"`
	RingMS       *float64 `json:"ringMs"`
	Codec        *string  `json:"codec"`
	JitterMS     *float64 `json:"jitterMs"`
	PacketsLost  *float64 `json:"packetsLost"`
	RTTMS        *float64 `json:"rttMs"`
	ReceivedKBPS *float64 `json:"receivedKbps"`
	SentKBPS     *float64 `json:"sentKbps"`
}

type CallRejectedPayload

type CallRejectedPayload struct {
	From   WebhookIdentity `json:"from"`
	CallID string          `json:"callId"`
	// contains filtered or unexported fields
}

type CallReportClient

type CallReportClient struct {
	SDK      string `json:"sdk"`
	Version  string `json:"version"`
	Platform string `json:"platform"`
}

type CallReportError

type CallReportError struct {
	Code string `json:"code"`
}

type CallReportRequest

type CallReportRequest struct {
	Kind         string            `json:"kind"`
	ConnectionID string            `json:"connectionId"`
	Participant  string            `json:"participant,omitempty"`
	Client       *CallReportClient `json:"client,omitempty"`
	Quality      *CallQuality      `json:"quality,omitempty"`
	Error        *CallReportError  `json:"error,omitempty"`
}

type CallReporter

type CallReporter struct {
	// contains filtered or unexported fields
}

CallReporter absorbs transport failures and bounds diagnostic traffic. It never includes message content, peer identity, audio, or video.

func NewCallReporter

func NewCallReporter(connectionID string, send func(context.Context, CallReportRequest) error) (*CallReporter, error)

func (*CallReporter) Error

func (r *CallReporter) Error(code string)

func (*CallReporter) Quality

func (r *CallReporter) Quality(q CallQuality)

func (*CallReporter) Stop

func (r *CallReporter) Stop()

func (*CallReporter) Stopped

func (r *CallReporter) Stopped() bool

type CallRetention

type CallRetention struct {
	Policy        CallRetentionPolicy `json:"policy"`
	RetentionDays int                 `json:"retentionDays"`
	AppliesTo     []string            `json:"appliesTo"`
	Revision      int64               `json:"revision"`
	UpdatedAt     *string             `json:"updatedAt"`
}

type CallRetentionPolicy

type CallRetentionPolicy string
const (
	RetentionShort      CallRetentionPolicy = "short"
	RetentionStandard   CallRetentionPolicy = "standard"
	RetentionExtended   CallRetentionPolicy = "extended"
	RetentionCompliance CallRetentionPolicy = "compliance"
	RetentionCustom     CallRetentionPolicy = "custom"
)

type CallRetentionResource

type CallRetentionResource struct {
	// contains filtered or unexported fields
}

func NewTeamCallRetentionClient

func NewTeamCallRetentionClient(c Config) (*CallRetentionResource, error)

NewTeamCallRetentionClient accepts a team or project credential without requiring a project ID for the team-wide setting.

func (*CallRetentionResource) Retrieve

func (*CallRetentionResource) Update

type CallSnapshot

type CallSnapshot struct {
	WaitingRoom                             *CallWaitingRoom
	ID, Direction, Peer, State, EndReason   string
	HasVideo                                bool
	Capabilities                            CallCapabilities
	Claim                                   CallClaim
	StartedAt, ConnectedAt, EndedAt         time.Time
	SampleRate                              int
	AudioMuted, VideoEnabled, ScreenSharing bool
	RemoteAudioMuted                        *bool
	HandRaised, SocialSupported             bool
	Participants                            []CallParticipant
	VideoSources                            map[uint32]CallVideoSource
	Reconnects                              int
}

type CallStats

type CallStats struct {
	Since           string                 `json:"since"`
	Until           string                 `json:"until"`
	Timezone        string                 `json:"timezone"`
	GroupBy         string                 `json:"groupBy"`
	Totals          CallStatsMetrics       `json:"totals"`
	Groups          []CallStatsGroup       `json:"groups"`
	GroupsTruncated bool                   `json:"groupsTruncated"`
	Heatmap         []CallStatsHeatmapCell `json:"heatmap"`
}

type CallStatsGroup

type CallStatsGroup struct {
	CallStatsMetrics
	Key   string  `json:"key"`
	Start *string `json:"start"`
}

type CallStatsHeatmapCell

type CallStatsHeatmapCell struct {
	DayOfWeek int   `json:"dayOfWeek"`
	Hour      int   `json:"hour"`
	Calls     int64 `json:"calls"`
	Answered  int64 `json:"answered"`
}

type CallStatsMetrics

type CallStatsMetrics struct {
	Calls                  int64    `json:"calls"`
	Answered               int64    `json:"answered"`
	Missed                 int64    `json:"missed"`
	Declined               int64    `json:"declined"`
	Failed                 int64    `json:"failed"`
	InProgress             int64    `json:"inProgress"`
	AnswerRate             *float64 `json:"answerRate"`
	TotalDurationSeconds   float64  `json:"totalDurationSeconds"`
	AverageDurationSeconds *float64 `json:"averageDurationSeconds"`
}

type CallStatsParams

type CallStatsParams struct {
	CallFilters
	GroupBy, Timezone string
}

type CallTelemetryPayload

type CallTelemetryPayload struct {
	CallID          string  `json:"callId"`
	SetupMS         float64 `json:"setupMs"`
	RingMS          float64 `json:"ringMs"`
	DurationSeconds float64 `json:"durationSeconds"`
	TerminateReason string  `json:"terminateReason"`
	Codec           string  `json:"codec"`
	JitterMS        float64 `json:"jitterMs"`
	PacketsLost     float64 `json:"packetsLost"`
	RTTMS           float64 `json:"rttMs"`
	RecvKBPS        float64 `json:"recvKbps"`
	SendKBPS        float64 `json:"sendKbps"`
	// contains filtered or unexported fields
}

type CallVideoSource

type CallVideoSource struct {
	ID                                  uint32
	Label                               string
	Participant                         *CallParticipant
	ConnectionID, ConnectionParticipant string
}

type CallWaitingRoom

type CallWaitingRoom struct {
	Enabled       bool              `json:"enabled"`
	IsAdmin       bool              `json:"isAdmin"`
	InWaitingRoom bool              `json:"inWaitingRoom"`
	Users         []CallParticipant `json:"users"`
}

type CallsClient

type CallsClient struct {
	// contains filtered or unexported fields
}

func NewCallsClient

func NewCallsClient(c CallsClientConfig) (*CallsClient, error)

func (*CallsClient) Answer

func (*CallsClient) AttachMedia

func (c *CallsClient) AttachMedia(ctx context.Context, callID, connectionID string) (*CallsMediaSocket, error)

func (*CallsClient) Connect

func (c *CallsClient) Connect(ctx context.Context) (*CallsLifecycle, error)

func (*CallsClient) End

func (*CallsClient) Follow

Follow authenticates one lifecycle connection, then follows the session until Close or context cancellation. Events applies backpressure to the reader.

func (*CallsClient) Place

func (*CallsClient) Reject

func (c *CallsClient) Reject(ctx context.Context, id string, o ...RequestOptions) (Response[Success], error)

type CallsClientConfig

type CallsClientConfig struct {
	Config        Config
	Connection    string
	Participant   string
	ReadyTimeout  time.Duration
	TokenProvider CallsTokenProvider
}

type CallsEvent

type CallsEvent struct {
	Type  string
	Call  *Call
	Frame *LifecycleFrame
	Error error
}

type CallsFollowOptions

type CallsFollowOptions struct {
	MinBackoff, MaxBackoff, Heartbeat time.Duration
	MediaReconnectAttempts            *int
}

type CallsLifecycle

type CallsLifecycle struct {
	Ready LifecycleFrame
	Token CallsToken
	// contains filtered or unexported fields
}

func (*CallsLifecycle) Close

func (l *CallsLifecycle) Close() error

func (*CallsLifecycle) Next

func (*CallsLifecycle) Ping

func (l *CallsLifecycle) Ping(ctx context.Context) error

func (*CallsLifecycle) RefreshAuth

func (l *CallsLifecycle) RefreshAuth(ctx context.Context, token CallsToken) error

func (*CallsLifecycle) SendCandidate

func (l *CallsLifecycle) SendCandidate(ctx context.Context, id, connection string, candidate TrickleCandidate) error

type CallsMediaFrame

type CallsMediaFrame struct {
	Audio   []int16
	Video   *VideoFrame
	Control *MediaControlFrame
}

func DecodeMediaFrame

func DecodeMediaFrame(bytes []byte) (CallsMediaFrame, error)

type CallsMediaSocket

type CallsMediaSocket struct {
	ConnectionID string
	SampleRate   int
	Video        bool
	Token        CallsToken
	// contains filtered or unexported fields
}

func (*CallsMediaSocket) Close

func (m *CallsMediaSocket) Close() error

func (*CallsMediaSocket) Leave

func (m *CallsMediaSocket) Leave(ctx context.Context) error

func (*CallsMediaSocket) ModerateWaitingRoom

func (m *CallsMediaSocket) ModerateWaitingRoom(ctx context.Context, operation, target string, enabled *bool) error

ModerateWaitingRoom sends one command without automatic replay. The public target ID must come from the latest authoritative pending roster.

func (*CallsMediaSocket) Ping

func (m *CallsMediaSocket) Ping(ctx context.Context) error

func (*CallsMediaSocket) Read

func (*CallsMediaSocket) RefreshAuth

func (m *CallsMediaSocket) RefreshAuth(ctx context.Context, token CallsToken, participant string) error

func (*CallsMediaSocket) UpdateMediaState

func (m *CallsMediaSocket) UpdateMediaState(ctx context.Context, a, v, screen *bool) (MediaControlFrame, error)

UpdateMediaState serializes at most 16 queued commands while the sole socket reader continues delivering audio, video and roster events. An unconfirmed command is never replayed automatically.

func (*CallsMediaSocket) WriteAudio

func (m *CallsMediaSocket) WriteAudio(ctx context.Context, pcm []int16) error

func (*CallsMediaSocket) WriteVideo

func (m *CallsMediaSocket) WriteVideo(ctx context.Context, v VideoFrame) error

type CallsSession

type CallsSession struct {
	// contains filtered or unexported fields
}

func (*CallsSession) Calls

func (s *CallsSession) Calls() []*Call

func (*CallsSession) Close

func (s *CallsSession) Close(ctx context.Context) error

func (*CallsSession) Connected

func (s *CallsSession) Connected() bool

func (*CallsSession) Done

func (s *CallsSession) Done() <-chan struct{}

Done closes when the session stops. Event channels remain open so concurrent call cleanup can finish safely; consumers select on Done.

func (*CallsSession) Events

func (s *CallsSession) Events() <-chan CallsEvent

func (*CallsSession) GetCall

func (s *CallsSession) GetCall(id string) *Call

func (*CallsSession) ParticipantReference

func (s *CallsSession) ParticipantReference() string

func (*CallsSession) Place

type CallsToken

type CallsToken struct {
	Value     string
	ExpiresAt time.Time
}

func (CallsToken) GoString

func (t CallsToken) GoString() string

func (CallsToken) String

func (t CallsToken) String() string

type CallsTokenProvider

type CallsTokenProvider func(context.Context, CallsTokenRequest) (CallsToken, error)

type CallsTokenRequest

type CallsTokenRequest struct{ Refresh bool }

type CallsTokenSource

type CallsTokenSource struct {
	// contains filtered or unexported fields
}

func NewCallsTokenSource

func NewCallsTokenSource(provider CallsTokenProvider) (*CallsTokenSource, error)

func (*CallsTokenSource) Get

func (s *CallsTokenSource) Get(ctx context.Context, refresh bool) (CallsToken, error)

func (*CallsTokenSource) Invalidate

func (s *CallsTokenSource) Invalidate()

type Campaign

type Campaign struct {
	VariableMapping   *CampaignVariableMapping   `json:"variableMapping,omitempty"`
	TrackedLinks      CampaignTrackedLinks       `json:"trackedLinks"`
	ID                string                     `json:"id"`
	Name              string                     `json:"name"`
	Status            string                     `json:"status"`
	TemplateID        *string                    `json:"templateId"`
	RecipientListID   *string                    `json:"recipientListId"`
	RecipientCount    int                        `json:"recipientCount"`
	SentCount         int                        `json:"sentCount"`
	DeliveredCount    int                        `json:"deliveredCount"`
	ReadCount         int                        `json:"readCount"`
	FailedCount       int                        `json:"failedCount"`
	SkippedCount      int                        `json:"skippedCount"`
	ScheduledAt       *int64                     `json:"scheduledAt"`
	LaunchedAt        *int64                     `json:"launchedAt"`
	CompletedAt       *int64                     `json:"completedAt"`
	CreatedAt         int64                      `json:"createdAt"`
	UpdatedAt         int64                      `json:"updatedAt"`
	SendWindow        *CampaignSendWindow        `json:"sendWindow"`
	ComposerBlueprint json.RawMessage            `json:"composerBlueprint,omitempty"`
	Messages          json.RawMessage            `json:"messages,omitempty"`
	AudienceRef       json.RawMessage            `json:"audienceRef,omitempty"`
	SenderConfig      json.RawMessage            `json:"senderConfig,omitempty"`
	ComplianceConfig  json.RawMessage            `json:"complianceConfig,omitempty"`
	Variants          []CampaignVariant          `json:"variants,omitempty"`
	VariantStrategy   *CampaignVariantStrategy   `json:"variantStrategy,omitempty"`
	ExperimentOutcome *CampaignExperimentOutcome `json:"experimentOutcome"`
	MessageVariations []CampaignMessageVariation `json:"messageVariations,omitempty"`
	FollowUp          *CampaignFollowUp          `json:"followUp"`
	// FrequencyCap is this campaign's own cap; nil when only the team cap applies.
	FrequencyCap *CampaignFrequencyCap `json:"frequencyCap,omitempty"`
	// Drip is nil for a campaign that is not a drip.
	Drip *CampaignDrip `json:"drip,omitempty"`
	// EnrollmentOpen reports continuous enrollment; nil for a non-drip.
	EnrollmentOpen *bool `json:"enrollmentOpen,omitempty"`
	// PauseReason is the stored reason while paused, or nil.
	PauseReason *string `json:"pauseReason,omitempty"`
	// SegmentID is the saved segment evaluated at launch, or nil. Read-only on
	// the Messaging API; choose segments with a team key.
	SegmentID       *string                  `json:"segmentId,omitempty"`
	SegmentSnapshot *CampaignSegmentSnapshot `json:"segmentSnapshot,omitempty"`
}

type CampaignAnalytics

type CampaignAnalytics struct {
	AverageResponseTimeMS *float64                   `json:"averageResponseTimeMs"`
	MinResponseTimeMS     *float64                   `json:"minResponseTimeMs"`
	MaxResponseTimeMS     *float64                   `json:"maxResponseTimeMs"`
	CampaignID            string                     `json:"campaignId"`
	RecipientCount        int                        `json:"recipientCount"`
	SentCount             int                        `json:"sentCount"`
	DeliveredCount        int                        `json:"deliveredCount"`
	ReadCount             int                        `json:"readCount"`
	FailedCount           int                        `json:"failedCount"`
	SkippedCount          int                        `json:"skippedCount"`
	RespondedCount        int                        `json:"respondedCount"`
	ResponseRate          float64                    `json:"responseRate"`
	Experiment            *CampaignExperimentResults `json:"experiment"`
	FollowUps             CampaignFollowUpReport     `json:"followUps"`
	// FrequencyCap counts recipients with a message skipped by the cap.
	FrequencyCap *CampaignFrequencyCapAnalytics `json:"frequencyCap,omitempty"`
	// Drip reports results by step; nil for a campaign that is not a drip.
	Drip *CampaignDripStats `json:"drip,omitempty"`
}

type CampaignApprovalRequester

type CampaignApprovalRequester struct {
	Type string `json:"type"`
	ID   string `json:"id"`
}

type CampaignBlueprint

type CampaignBlueprint struct {
	Version int             `json:"version"`
	Source  string          `json:"source"`
	Extra   PlatformPayload `json:"-"`
}

func (CampaignBlueprint) MarshalJSON

func (v CampaignBlueprint) MarshalJSON() ([]byte, error)

func (*CampaignBlueprint) UnmarshalJSON

func (v *CampaignBlueprint) UnmarshalJSON(b []byte) error

type CampaignCapReachedPayload

type CampaignCapReachedPayload struct {
	CampaignID     string `json:"campaignId"`
	ConnectionKey  string `json:"connectionKey"`
	Phone          string `json:"phone"`
	CapType        string `json:"capType"`
	CapLimit       int    `json:"capLimit"`
	WindowResetsAt int64  `json:"windowResetsAt"`
	At             int64  `json:"at"`
	// contains filtered or unexported fields
}

type CampaignColdBlockedPayload

type CampaignColdBlockedPayload struct {
	CampaignID  string `json:"campaignId"`
	RecipientID string `json:"recipientId"`
	Phone       string `json:"phone"`
	Surface     string `json:"surface"`
	Reason      string `json:"reason"`
	At          int64  `json:"at"`
	// contains filtered or unexported fields
}

type CampaignCompletedPayload

type CampaignCompletedPayload struct {
	CampaignID     string `json:"campaignId"`
	SentCount      int    `json:"sentCount"`
	DeliveredCount int    `json:"deliveredCount"`
	ReadCount      int    `json:"readCount"`
	FailedCount    int    `json:"failedCount"`
	SkippedCount   int    `json:"skippedCount"`
	ResponseCount  int    `json:"responseCount"`
	CompletedAt    int64  `json:"completedAt"`
	DurationMS     int64  `json:"durationMs"`
	// contains filtered or unexported fields
}

type CampaignComposedButton

type CampaignComposedButton struct {
	ID    *string         `json:"id,omitempty"`
	Kind  string          `json:"kind"`
	Label string          `json:"label"`
	URL   *string         `json:"url,omitempty"`
	Phone *string         `json:"phone,omitempty"`
	Extra PlatformPayload `json:"-"`
}

func (CampaignComposedButton) MarshalJSON

func (v CampaignComposedButton) MarshalJSON() ([]byte, error)

MarshalJSON retains a legacy extension ID when no typed ID is set. Both forms may agree; conflicting or nonstring extension values fail without mutating v.

func (*CampaignComposedButton) UnmarshalJSON

func (v *CampaignComposedButton) UnmarshalJSON(b []byte) error

type CampaignComposedMedia

type CampaignComposedMedia struct {
	Kind     string          `json:"kind"`
	URL      string          `json:"url"`
	Filename *string         `json:"filename,omitempty"`
	Caption  *string         `json:"caption,omitempty"`
	Extra    PlatformPayload `json:"-"`
}

func (CampaignComposedMedia) MarshalJSON

func (v CampaignComposedMedia) MarshalJSON() ([]byte, error)

func (*CampaignComposedMedia) UnmarshalJSON

func (v *CampaignComposedMedia) UnmarshalJSON(b []byte) error

type CampaignComposedMessage

type CampaignComposedMessage struct {
	Version *int                      `json:"version,omitempty"`
	Source  *string                   `json:"source,omitempty"`
	Media   *CampaignComposedMedia    `json:"media,omitempty"`
	Buttons *[]CampaignComposedButton `json:"buttons,omitempty"`
	Footer  *string                   `json:"footer,omitempty"`
	// DelayAfterSec is 0..86400, or 0..2592000 for drip steps, in whole
	// multiples of DelayUnit when set.
	DelayAfterSec *int               `json:"delayAfterSec,omitempty"`
	DelayUnit     *CampaignDelayUnit `json:"delayUnit,omitempty"`
	// SendWindow applies to later drip steps only; null removes a step window.
	SendWindow *Nullable[CampaignStepWindow] `json:"sendWindow,omitempty"`
	Extra      PlatformPayload               `json:"-"`
}

Composed messages and their nested media/buttons preserve declared extensions.

func (CampaignComposedMessage) MarshalJSON

func (v CampaignComposedMessage) MarshalJSON() ([]byte, error)

func (*CampaignComposedMessage) UnmarshalJSON

func (v *CampaignComposedMessage) UnmarshalJSON(b []byte) error

type CampaignConversion

type CampaignConversion struct {
	ID          string                        `json:"id"`
	CampaignID  string                        `json:"campaignId"`
	RecipientID *string                       `json:"recipientId"`
	EventType   string                        `json:"eventType"`
	OccurredAt  string                        `json:"occurredAt"`
	Value       *CampaignConversionValue      `json:"value"`
	Evidence    string                        `json:"evidence"`
	Attribution CampaignConversionAttribution `json:"attribution"`
	RecordedAt  string                        `json:"recordedAt"`
	Replayed    bool                          `json:"replayed"`
}

type CampaignConversionAttribution

type CampaignConversionAttribution struct {
	Outcome    string  `json:"outcome"`
	TouchAt    *string `json:"touchAt"`
	WindowDays int     `json:"windowDays"`
}

type CampaignConversionCounts

type CampaignConversionCounts struct {
	Total         int `json:"total"`
	Attributed    int `json:"attributed"`
	OutsideWindow int `json:"outsideWindow"`
	NotSent       int `json:"notSent"`
	OptedOut      int `json:"optedOut"`
}

type CampaignConversionCurrencyTotal

type CampaignConversionCurrencyTotal struct {
	Currency                string `json:"currency"`
	Evidence                string `json:"evidence"`
	AttributedConversions   int    `json:"attributedConversions"`
	AttributedAmountMinor   string `json:"attributedAmountMinor"`
	UnattributedConversions int    `json:"unattributedConversions"`
	UnattributedAmountMinor string `json:"unattributedAmountMinor"`
}

type CampaignConversionModel

type CampaignConversionModel struct {
	Touch       string `json:"touch"`
	WindowDays  int    `json:"windowDays"`
	Correlation string `json:"correlation"`
}

type CampaignConversionReport

type CampaignConversionReport struct {
	CampaignID          string                            `json:"campaignId"`
	Model               CampaignConversionModel           `json:"model"`
	SentCount           int                               `json:"sentCount"`
	Conversions         CampaignConversionCounts          `json:"conversions"`
	ConvertedRecipients int                               `json:"convertedRecipients"`
	ConversionRate      float64                           `json:"conversionRate"`
	Values              []CampaignConversionCurrencyTotal `json:"values"`
}

type CampaignConversionValue

type CampaignConversionValue struct {
	AmountMinor int64  `json:"amountMinor"`
	Currency    string `json:"currency"`
}

type CampaignDelayUnit

type CampaignDelayUnit string
const (
	CampaignDelayMinutes CampaignDelayUnit = "minutes"
	CampaignDelayHours   CampaignDelayUnit = "hours"
	CampaignDelayDays    CampaignDelayUnit = "days"
)

type CampaignDrip

type CampaignDrip struct {
	Enrollment      CampaignDripEnrollment `json:"enrollment"`
	ExitOnReply     bool                   `json:"exitOnReply"`
	ExitOnLinkClick bool                   `json:"exitOnLinkClick"`
}

CampaignDrip is the stored beta drip configuration. A GET request to a tracked link counts as a click, including link previews and scanners.

type CampaignDripEnrollment

type CampaignDripEnrollment string
const (
	CampaignDripAudience   CampaignDripEnrollment = "audience"
	CampaignDripContinuous CampaignDripEnrollment = "continuous"
)

type CampaignDripExitReason

type CampaignDripExitReason string

CampaignDripExitReason values appear in CampaignRecipient.SequenceError; arbitrary send failure codes also occur there.

const (
	CampaignDripExitReplied     CampaignDripExitReason = "replied"
	CampaignDripExitLinkClicked CampaignDripExitReason = "link_clicked"
	CampaignDripExitOptedOut    CampaignDripExitReason = "opted_out"
)

type CampaignDripInput

type CampaignDripInput struct {
	Enrollment      CampaignDripEnrollment `json:"enrollment,omitempty"`
	ExitOnReply     *bool                  `json:"exitOnReply,omitempty"`
	ExitOnLinkClick *bool                  `json:"exitOnLinkClick,omitempty"`
}

CampaignDripInput creates a drip. The API applies the defaults audience, exit on reply and no exit on link click to omitted fields.

type CampaignDripPatch

type CampaignDripPatch struct {
	Enrollment      CampaignDripEnrollment `json:"enrollment,omitempty"`
	ExitOnReply     *bool                  `json:"exitOnReply,omitempty"`
	ExitOnLinkClick *bool                  `json:"exitOnLinkClick,omitempty"`
}

CampaignDripPatch changes stored drip settings. Omitted fields keep their stored values; the SDK applies no defaults.

type CampaignDripStats

type CampaignDripStats struct {
	Enrollment    CampaignDripEnrollment  `json:"enrollment"`
	Enrolled      int                     `json:"enrolled"`
	EnrolledByAPI int                     `json:"enrolledByApi"`
	Active        int                     `json:"active"`
	Completed     int                     `json:"completed"`
	Exited        int                     `json:"exited"`
	Steps         []CampaignDripStepStats `json:"steps"`
}

type CampaignDripStepStats

type CampaignDripStepStats struct {
	Step      int `json:"step"`
	Entered   int `json:"entered"`
	Waiting   int `json:"waiting"`
	Sent      int `json:"sent"`
	Delivered int `json:"delivered"`
	Read      int `json:"read"`
	Replied   int `json:"replied"`
	Exited    int `json:"exited"`
	Failed    int `json:"failed"`
}

type CampaignEnrollment

type CampaignEnrollment struct {
	CampaignID  string `json:"campaignId"`
	RecipientID string `json:"recipientId"`
	Phone       string `json:"phone"`
	Created     bool   `json:"created"`
	Status      string `json:"status"`
	// EnrolledAt is Unix milliseconds.
	EnrolledAt float64 `json:"enrolledAt"`
}

type CampaignExperimentOutcome

type CampaignExperimentOutcome struct {
	State     string `json:"state"`
	WinnerKey string `json:"winnerKey,omitempty"`
	Reason    string `json:"reason,omitempty"`
}

type CampaignExperimentResults

type CampaignExperimentResults struct {
	Criterion    string                            `json:"criterion"`
	Outcome      *CampaignExperimentOutcome        `json:"outcome"`
	HoldoutCount int                               `json:"holdoutCount"`
	ReserveCount int                               `json:"reserveCount"`
	Variants     []CampaignExperimentVariantResult `json:"variants"`
}

type CampaignExperimentVariantResult

type CampaignExperimentVariantResult struct {
	Key         string  `json:"key"`
	Label       string  `json:"label"`
	Weight      int     `json:"weight"`
	Assigned    int     `json:"assigned"`
	Sent        int     `json:"sent"`
	Delivered   int     `json:"delivered"`
	Read        int     `json:"read"`
	Replied     int     `json:"replied"`
	OutcomeRate float64 `json:"outcomeRate"`
}

type CampaignFailedPayload

type CampaignFailedPayload struct {
	CampaignID string `json:"campaignId"`
	Reason     string `json:"reason"`
	FailedAt   int64  `json:"failedAt"`
	// contains filtered or unexported fields
}

type CampaignFollowUp

type CampaignFollowUp struct {
	// DelaySeconds is optional, 60 through 604800; the API defaults to 86400.
	DelaySeconds *int `json:"delaySeconds,omitempty"`
	// ExpirySeconds is optional, 86400 through 2592000 and longer than the delay;
	// the API defaults to 604800. Expiry starts at the first message's send.
	ExpirySeconds *int                    `json:"expirySeconds,omitempty"`
	Message       CampaignFollowUpMessage `json:"message"`
}

CampaignFollowUp configures one receipt-timed follow-up (beta). The first delivery starts the wait; the first read restarts it before sending starts. Replies and opt-outs cancel it. The API enforces enrollment and bounds.

func (CampaignFollowUp) MarshalJSON

func (v CampaignFollowUp) MarshalJSON() ([]byte, error)

func (*CampaignFollowUp) UnmarshalJSON

func (v *CampaignFollowUp) UnmarshalJSON(data []byte) error

type CampaignFollowUpMessage

type CampaignFollowUpMessage interface {
	// contains filtered or unexported methods
}

CampaignFollowUpMessage is a sealed text/template union. Each variant supplies its own fixed discriminator, so callers cannot mix text and template fields.

type CampaignFollowUpReport

type CampaignFollowUpReport struct {
	Total     int    `json:"total"`
	Waiting   int    `json:"waiting"`
	Scheduled int    `json:"scheduled"`
	Sending   int    `json:"sending"`
	Sent      int    `json:"sent"`
	Delivered int    `json:"delivered"`
	Read      int    `json:"read"`
	Replied   int    `json:"replied"`
	Cancelled int    `json:"cancelled"`
	Expired   int    `json:"expired"`
	Failed    int    `json:"failed"`
	Unknown   int    `json:"unknown"`
	NextDueAt *int64 `json:"nextDueAt"`
}

CampaignFollowUpReport counts follow-up outcomes separately from first messages.

type CampaignFollowUpStatus

type CampaignFollowUpStatus string
const (
	CampaignFollowUpWaitingReceipt CampaignFollowUpStatus = "waiting_receipt"
	CampaignFollowUpScheduled      CampaignFollowUpStatus = "scheduled"
	CampaignFollowUpSending        CampaignFollowUpStatus = "sending"
	CampaignFollowUpSent           CampaignFollowUpStatus = "sent"
	CampaignFollowUpCancelled      CampaignFollowUpStatus = "cancelled"
	CampaignFollowUpExpired        CampaignFollowUpStatus = "expired"
	CampaignFollowUpFailed         CampaignFollowUpStatus = "failed"
	CampaignFollowUpOutcomeUnknown CampaignFollowUpStatus = "outcome_unknown"
)

type CampaignFollowUpSummary

type CampaignFollowUpSummary struct {
	ID               string                 `json:"id"`
	ConnectionID     string                 `json:"connectionId"`
	Status           CampaignFollowUpStatus `json:"status"`
	AnchorKind       *string                `json:"anchorKind"`
	FirstDeliveredAt *int64                 `json:"firstDeliveredAt"`
	FirstReadAt      *int64                 `json:"firstReadAt"`
	DueAt            *int64                 `json:"dueAt"`
	ExpiresAt        int64                  `json:"expiresAt"`
	SentAt           *int64                 `json:"sentAt"`
	DeliveredAt      *int64                 `json:"deliveredAt"`
	ReadAt           *int64                 `json:"readAt"`
	RepliedAt        *int64                 `json:"repliedAt"`
	Reason           *string                `json:"reason"`
	CommandID        *string                `json:"commandId"`
}

CampaignFollowUpSummary describes one recipient's follow-up. Times are Unix milliseconds; a nil anchor means that no delivery or read receipt timed it.

type CampaignFollowUpTemplateMessage

type CampaignFollowUpTemplateMessage struct {
	TemplateID string `json:"templateId"`
}

func (CampaignFollowUpTemplateMessage) MarshalJSON

func (v CampaignFollowUpTemplateMessage) MarshalJSON() ([]byte, error)

type CampaignFollowUpTextMessage

type CampaignFollowUpTextMessage struct {
	Text string `json:"text"`
}

func (CampaignFollowUpTextMessage) MarshalJSON

func (v CampaignFollowUpTextMessage) MarshalJSON() ([]byte, error)

type CampaignFrequencyCap

type CampaignFrequencyCap struct {
	MaxPer24Hours *int `json:"maxPer24Hours"`
	MaxPer7Days   *int `json:"maxPer7Days"`
}

CampaignFrequencyCap holds rolling per-contact limits. A nil limit means no additional limit for that window. MaxPer24Hours is 1..50 and cannot exceed MaxPer7Days (1..200) when both are set.

type CampaignFrequencyCapAnalytics

type CampaignFrequencyCapAnalytics struct {
	SkippedRecipientCount int `json:"skippedRecipientCount"`
}

CampaignFrequencyCapAnalytics counts recipients with a message skipped by the cap.

type CampaignFrequencyCapSettings

type CampaignFrequencyCapSettings struct {
	CampaignFrequencyCap
	TeamID    string `json:"teamId"`
	Revision  int    `json:"revision"`
	UpdatedAt *int64 `json:"updatedAt"`
}

CampaignFrequencyCapSettings is the team cap. Revision is 0 and UpdatedAt is nil until the team first saves.

type CampaignLaunchApproval

type CampaignLaunchApproval struct {
	ID             string                    `json:"id"`
	CampaignID     string                    `json:"campaignId"`
	Action         string                    `json:"action"`
	Status         string                    `json:"status"`
	Reasons        []string                  `json:"reasons"`
	RecipientCount int64                     `json:"recipientCount"`
	ScheduledAt    *int64                    `json:"scheduledAt"`
	RequestedBy    CampaignApprovalRequester `json:"requestedBy"`
	RequestedAt    int64                     `json:"requestedAt"`
	ExpiresAt      int64                     `json:"expiresAt"`
	DecidedBy      *string                   `json:"decidedBy"`
	DecidedAt      *int64                    `json:"decidedAt"`
	OperationID    *string                   `json:"operationId"`
}

type CampaignLaunchApprovalSettings

type CampaignLaunchApprovalSettings struct {
	RecipientThreshold *int64 `json:"recipientThreshold"`
}

type CampaignLaunchedPayload

type CampaignLaunchedPayload struct {
	CampaignID     string `json:"campaignId"`
	Name           string `json:"name"`
	RecipientCount int    `json:"recipientCount"`
	Scheduled      bool   `json:"scheduled"`
	LaunchedAt     int64  `json:"launchedAt"`
	// contains filtered or unexported fields
}

type CampaignMessageVariation

type CampaignMessageVariation struct {
	Key       string            `json:"key"`
	Weight    int               `json:"weight"`
	Blueprint CampaignBlueprint `json:"blueprint"`
}

type CampaignOperation

type CampaignOperation struct {
	Campaign
	OperationID string `json:"operationId"`
}

type CampaignPausedPayload

type CampaignPausedPayload struct {
	CampaignID     string  `json:"campaignId"`
	SentCount      int     `json:"sentCount"`
	RemainingCount int     `json:"remainingCount"`
	PausedAt       int64   `json:"pausedAt"`         // Unix seconds.
	Reason         *string `json:"reason,omitempty"` // Automatic pauses only; open string.
	Code           *string `json:"code,omitempty"`   // Automatic pauses only; open string.
	// contains filtered or unexported fields
}

type CampaignProjectParams

type CampaignProjectParams struct{ ProjectID string }

type CampaignRecipient

type CampaignRecipient struct {
	FailureReason     *CampaignRecipientFailureReason `json:"failureReason"`
	MessagesSent      int                             `json:"messagesSent"`
	NextMessageAt     *float64                        `json:"nextMessageAt"`
	SequenceError     *string                         `json:"sequenceError"`
	ID                string                          `json:"id"`
	Phone             string                          `json:"phone"`
	Variables         PlatformPayload                 `json:"variables"`
	VariantKey        *string                         `json:"variantKey"`
	Status            string                          `json:"status"`
	Attempts          int                             `json:"attempts"`
	LastError         *string                         `json:"lastError"`
	ExternalMessageID *string                         `json:"externalMessageId"`
	QueuedAt          int64                           `json:"queuedAt"`
	SentAt            *int64                          `json:"sentAt"`
	DeliveredAt       *int64                          `json:"deliveredAt"`
	ReadAt            *int64                          `json:"readAt"`
	FailedAt          *int64                          `json:"failedAt"`
	RespondedAt       *int64                          `json:"respondedAt"`
	FollowUp          *CampaignFollowUpSummary        `json:"followUp"`
}

type CampaignRecipientExportPage

type CampaignRecipientExportPage struct {
	CSV        string
	NextCursor *string
	Filename   *string
}

type CampaignRecipientExportParams

type CampaignRecipientExportParams struct {
	Status *string
	Reason *string
	Cursor *string
	Limit  *int
}

type CampaignRecipientFailedPayload

type CampaignRecipientFailedPayload struct {
	CampaignID  string `json:"campaignId"`
	RecipientID string `json:"recipientId"`
	Phone       string `json:"phone"`
	Attempts    int    `json:"attempts"`
	Error       string `json:"error"`
	FailedAt    int64  `json:"failedAt"`
	// contains filtered or unexported fields
}

type CampaignRecipientFailureReason

type CampaignRecipientFailureReason string
const (
	CampaignFailureOptedOut               CampaignRecipientFailureReason = "opted_out"
	CampaignFailureColdHeld               CampaignRecipientFailureReason = "cold_held"
	CampaignFailureCancelled              CampaignRecipientFailureReason = "campaign_cancelled"
	CampaignFailureInvalidRecipient       CampaignRecipientFailureReason = "invalid_recipient"
	CampaignFailureConnectionNotConnected CampaignRecipientFailureReason = "connection_not_connected"
	CampaignFailureAckTimeout             CampaignRecipientFailureReason = "ack_timeout"
	CampaignFailureBlockedBySafety        CampaignRecipientFailureReason = "blocked_by_safety"
	CampaignFailureSendFailed             CampaignRecipientFailureReason = "send_failed"
	CampaignFailureMissingVariable        CampaignRecipientFailureReason = "missing_variable"
	CampaignFailureFrequencyCap           CampaignRecipientFailureReason = "frequency_cap"
	CampaignFailureOther                  CampaignRecipientFailureReason = "other"
)

type CampaignRecipientInput

type CampaignRecipientInput struct {
	Phone     string                      `json:"phone"`
	Variables map[string]CampaignVariable `json:"variables,omitempty"`
}

type CampaignRecipientSentPayload

type CampaignRecipientSentPayload struct {
	CampaignID        string `json:"campaignId"`
	RecipientID       string `json:"recipientId"`
	Phone             string `json:"phone"`
	ConnectionKey     string `json:"connectionKey"`
	ExternalMessageID string `json:"externalMessageId"`
	VariantKey        string `json:"variantKey"`
	Attempt           int    `json:"attempt"`
	// contains filtered or unexported fields
}

type CampaignRecipientSkippedPayload

type CampaignRecipientSkippedPayload struct {
	CampaignID   string  `json:"campaignId"`
	RecipientID  string  `json:"recipientId"`
	Phone        string  `json:"phone"`
	Reason       string  `json:"reason"`
	SkippedAt    int64   `json:"skippedAt"`              // Unix milliseconds.
	MessageIndex *int    `json:"messageIndex,omitempty"` // Nonnegative sequence position; zero is meaningful.
	FollowUpID   *string `json:"followUpId,omitempty"`   // UUID of a capped follow-up.
	// contains filtered or unexported fields
}

type CampaignReplyButton

type CampaignReplyButton struct {
	ID   string `json:"id"`
	Text string `json:"text"`
}

type CampaignReplyButtons

type CampaignReplyButtons struct {
	Body    string                `json:"body"`
	Footer  *string               `json:"footer,omitempty"`
	Buttons []CampaignReplyButton `json:"buttons"`
}

func (CampaignReplyButtons) MarshalJSON

func (v CampaignReplyButtons) MarshalJSON() ([]byte, error)

type CampaignReplyChoice

type CampaignReplyChoice struct {
	ReplyKind string `json:"replyKind"`
	ID        string `json:"id"`
}

func (CampaignReplyChoice) MarshalJSON

func (v CampaignReplyChoice) MarshalJSON() ([]byte, error)

type CampaignReplyFlow

type CampaignReplyFlow struct {
	ID         string                      `json:"id"`
	FlowKey    string                      `json:"flowKey"`
	Revision   int64                       `json:"revision"`
	Name       string                      `json:"name"`
	Definition CampaignReplyFlowDefinition `json:"definition"`
	CreatedAt  int64                       `json:"createdAt"`
}

type CampaignReplyFlowAssignment

type CampaignReplyFlowAssignment struct {
	CampaignID  string  `json:"campaignId"`
	ReplyFlowID *string `json:"replyFlowId"`
}

type CampaignReplyFlowDefinition

type CampaignReplyFlowDefinition struct {
	EntryNodeID string                  `json:"entryNodeId"`
	Nodes       []CampaignReplyFlowNode `json:"nodes"`
}

type CampaignReplyFlowEdge

type CampaignReplyFlowEdge struct {
	Match CampaignReplyFlowMatch `json:"match"`
	To    string                 `json:"to"`
}

func (*CampaignReplyFlowEdge) UnmarshalJSON

func (e *CampaignReplyFlowEdge) UnmarshalJSON(data []byte) error

type CampaignReplyFlowForm

type CampaignReplyFlowForm struct {
	FlowID     string  `json:"flowId"`
	Body       string  `json:"body"`
	ButtonText string  `json:"buttonText"`
	Footer     *string `json:"footer,omitempty"`
	Screen     string  `json:"screen"`
}

func (CampaignReplyFlowForm) MarshalJSON

func (v CampaignReplyFlowForm) MarshalJSON() ([]byte, error)

type CampaignReplyFlowMatch

type CampaignReplyFlowMatch interface {
	// contains filtered or unexported methods
}

type CampaignReplyFlowNode

type CampaignReplyFlowNode struct {
	ID    string                  `json:"id"`
	Send  CampaignReplyFlowSend   `json:"send,omitempty"`
	Edges []CampaignReplyFlowEdge `json:"edges"`
}

func (*CampaignReplyFlowNode) UnmarshalJSON

func (n *CampaignReplyFlowNode) UnmarshalJSON(data []byte) error

type CampaignReplyFlowSend

type CampaignReplyFlowSend interface {
	// contains filtered or unexported methods
}

CampaignReplyFlowSend is a closed set of supported public message variants.

type CampaignReplyKeyword

type CampaignReplyKeyword struct {
	Value string `json:"value"`
}

func (CampaignReplyKeyword) MarshalJSON

func (v CampaignReplyKeyword) MarshalJSON() ([]byte, error)

type CampaignReplyList

type CampaignReplyList struct {
	Body       string             `json:"body"`
	ButtonText string             `json:"buttonText"`
	Footer     *string            `json:"footer,omitempty"`
	Rows       []CampaignReplyRow `json:"rows"`
}

func (CampaignReplyList) MarshalJSON

func (v CampaignReplyList) MarshalJSON() ([]byte, error)

type CampaignReplyRow

type CampaignReplyRow struct {
	ID          string  `json:"id"`
	Title       string  `json:"title"`
	Description *string `json:"description,omitempty"`
}

type CampaignReplySubmission

type CampaignReplySubmission struct{}

func (CampaignReplySubmission) MarshalJSON

func (CampaignReplySubmission) MarshalJSON() ([]byte, error)

type CampaignReplyText

type CampaignReplyText struct {
	Text string `json:"text"`
}

func (CampaignReplyText) MarshalJSON

func (v CampaignReplyText) MarshalJSON() ([]byte, error)

type CampaignRequeueResult

type CampaignRequeueResult struct {
	Requeued int `json:"requeued"`
}

type CampaignRescheduledPayload

type CampaignRescheduledPayload struct {
	CampaignID          string `json:"campaignId"`
	PreviousScheduledAt *int64 `json:"previousScheduledAt"`
	ScheduledAt         int64  `json:"scheduledAt"`
	RescheduledAt       int64  `json:"rescheduledAt"`
	// contains filtered or unexported fields
}

type CampaignResumedPayload

type CampaignResumedPayload struct {
	CampaignID     string `json:"campaignId"`
	SentCount      int    `json:"sentCount"`
	RemainingCount int    `json:"remainingCount"`
	ResumedAt      int64  `json:"resumedAt"`
	// contains filtered or unexported fields
}

type CampaignRetargetOutcome

type CampaignRetargetOutcome string
const (
	CampaignOutcomeDelivered    CampaignRetargetOutcome = "delivered"
	CampaignOutcomeNotDelivered CampaignRetargetOutcome = "not_delivered"
	CampaignOutcomeRead         CampaignRetargetOutcome = "read"
	CampaignOutcomeNotRead      CampaignRetargetOutcome = "not_read"
	CampaignOutcomeReplied      CampaignRetargetOutcome = "replied"
	CampaignOutcomeNotReplied   CampaignRetargetOutcome = "not_replied"
	CampaignOutcomeFailed       CampaignRetargetOutcome = "failed"
)

type CampaignSegmentSnapshot

type CampaignSegmentSnapshot struct {
	Revision     int   `json:"revision"`
	EvaluatedAt  int64 `json:"evaluatedAt"`
	MatchedCount int   `json:"matchedCount"`
}

CampaignSegmentSnapshot is what launch froze from a saved segment.

type CampaignSendWindow

type CampaignSendWindow struct {
	TimeZone          string                    `json:"timeZone"`
	Days              []string                  `json:"days"`
	Hours             []CampaignSendWindowRange `json:"hours"`
	RecipientTimeZone bool                      `json:"recipientTimeZone"`
	TimeZoneVariable  string                    `json:"timeZoneVariable"`
}

type CampaignSendWindowRange

type CampaignSendWindowRange struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type CampaignSendWindowRequest

type CampaignSendWindowRequest struct {
	TimeZone          string                    `json:"timeZone,omitempty"`
	Days              []string                  `json:"days"`
	Hours             []CampaignSendWindowRange `json:"hours"`
	RecipientTimeZone *bool                     `json:"recipientTimeZone,omitempty"`
	TimeZoneVariable  string                    `json:"timeZoneVariable,omitempty"`
}

type CampaignSettings

type CampaignSettings struct {
	LaunchApproval CampaignLaunchApprovalSettings `json:"launchApproval"`
}

type CampaignStepWindow

type CampaignStepWindow struct {
	Days  []string                  `json:"days"`
	Hours []CampaignSendWindowRange `json:"hours"`
}

CampaignStepWindow replaces the campaign weekdays and hours for a later drip step. At most four hour ranges, in the campaign's time zone.

type CampaignStopOperation

type CampaignStopOperation struct {
	Campaign
	OperationID *string `json:"operationId"`
}

type CampaignStoppedPayload

type CampaignStoppedPayload struct {
	CampaignID     string `json:"campaignId"`
	SentCount      int    `json:"sentCount"`
	AbandonedCount int    `json:"abandonedCount"`
	StoppedAt      int64  `json:"stoppedAt"`
	// contains filtered or unexported fields
}

type CampaignTestSend

type CampaignTestSend struct {
	ID         string             `json:"id"`
	CampaignID string             `json:"campaignId"`
	Status     string             `json:"status"`
	From       CampaignTestSender `json:"from"`
	To         string             `json:"to"`
	MessageID  *string            `json:"messageId"`
	Variables  map[string]string  `json:"variables"`
	CreatedAt  int64              `json:"createdAt"`
}

type CampaignTestSendRequest

type CampaignTestSendRequest struct {
	ConnectionID      string                       `json:"connectionId"`
	To                string                       `json:"to"`
	SampleRecipientID *string                      `json:"sampleRecipientId,omitempty"`
	Variables         *map[string]CampaignVariable `json:"variables,omitempty"`
}

type CampaignTestSender

type CampaignTestSender struct {
	ConnectionID string `json:"connectionId"`
	Phone        string `json:"phone"`
}

type CampaignThrottledPayload

type CampaignThrottledPayload struct {
	CampaignID    string `json:"campaignId"`
	ConnectionKey string `json:"connectionKey"`
	Reason        string `json:"reason"`
	DeferredCount int    `json:"deferredCount"`
	At            int64  `json:"at"`
	// contains filtered or unexported fields
}
type CampaignTrackedLink struct {
	Key string `json:"key"`
	URL string `json:"url"`
}

type CampaignTrackedLinkReport

type CampaignTrackedLinkReport struct {
	Key         string `json:"key"`
	URL         string `json:"url"`
	UniqueOpens int64  `json:"uniqueOpens"`
	TotalOpens  int64  `json:"totalOpens"`
}
type CampaignTrackedLinks []CampaignTrackedLink

func (CampaignTrackedLinks) MarshalJSON

func (v CampaignTrackedLinks) MarshalJSON() ([]byte, error)

type CampaignVariable

type CampaignVariable = UsageDimension

CampaignVariable is a JSON string, number or boolean, as the API accepts.

type CampaignVariableBinding

type CampaignVariableBinding struct {
	Extra    PlatformPayload `json:"-"`
	Source   *string         `json:"source,omitempty"`
	Fallback *string         `json:"fallback,omitempty"`
}

CampaignVariableBinding selects a customer field and/or fallback text.

func (CampaignVariableBinding) MarshalJSON

func (v CampaignVariableBinding) MarshalJSON() ([]byte, error)

func (*CampaignVariableBinding) UnmarshalJSON

func (v *CampaignVariableBinding) UnmarshalJSON(b []byte) error

type CampaignVariableMapping

type CampaignVariableMapping map[string]CampaignVariableBinding

func (CampaignVariableMapping) MarshalJSON

func (v CampaignVariableMapping) MarshalJSON() ([]byte, error)

type CampaignVariant

type CampaignVariant struct {
	Key       string            `json:"key"`
	Label     string            `json:"label"`
	Weight    int               `json:"weight"`
	Blueprint CampaignBlueprint `json:"blueprint"`
}

type CampaignVariantStrategy

type CampaignVariantStrategy struct {
	WinnerCriterion   string `json:"winnerCriterion"`
	HoldoutPercent    int    `json:"holdoutPercent"`
	TestSlicePercent  *int   `json:"testSlicePercent,omitempty"`
	AutoPromote       bool   `json:"autoPromote"`
	TestWindowMinutes int    `json:"testWindowMinutes"`
}

type Campaigns

type Campaigns struct {
	// contains filtered or unexported fields
}

func (*Campaigns) Archive

func (*Campaigns) Duplicate

func (*Campaigns) Enroll

Enroll adds a contact to a running or paused continuous drip. The write is sent once: per-phone server idempotency does not make an ambiguous retry safe.

func (*Campaigns) GetFrequencyCap

GetFrequencyCap reads the team cap. Team key with campaigns:read.

func (*Campaigns) GetSettings

func (*Campaigns) List

func (*Campaigns) ListLaunchApprovals

func (*Campaigns) Pause

func (*Campaigns) Requeue

func (*Campaigns) Resume

func (*Campaigns) Stop

func (*Campaigns) UpdateFrequencyCap

UpdateFrequencyCap replaces both team limits. A stale revision returns a conflict; read again and reconcile. Setting limits requires beta access. Sent once: reconcile a lost response with a fresh read.

type CarouselCard

type CarouselCard struct {
	Body    string                  `json:"body"`
	Buttons []MessageButton         `json:"buttons"`
	Image   *InteractiveMediaSource `json:"image,omitempty"`
	Video   *CarouselVideo          `json:"video,omitempty"`
}

A card has no footer. Set the footer on CarouselContent instead.

type CarouselContent

type CarouselContent struct {
	Body   string         `json:"body"`
	Footer *string        `json:"footer,omitempty"`
	Cards  []CarouselCard `json:"cards"`
}

type CarouselVideo

type CarouselVideo struct {
	InteractiveMediaSource
	Thumbnail *string `json:"thumbnail,omitempty"`
}

type CatalogProductsParams

type CatalogProductsParams struct {
	Limit  *int
	Cursor string
}

type Catalogs

type Catalogs struct {
	// contains filtered or unexported fields
}

Catalogs reads the Connection's saved Official catalog cache, separately from Graph.

func (*Catalogs) List

func (*Catalogs) Retrieve

func (*Catalogs) Sync

Sync submits once. A failed or uncertain provider operation is never replayed.

type Channel

type Channel struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	ProfileURL  string `json:"profileUrl,omitempty"`
	Followers   *int64 `json:"followers,omitempty"`
	Muted       *bool  `json:"muted,omitempty"`
	Preview     *bool  `json:"preview,omitempty"`
}

type ChannelActionResult

type ChannelActionResult struct {
	Status string `json:"status"`
}

type ChannelLiveUpdates

type ChannelLiveUpdates struct {
	DurationSeconds int `json:"durationSeconds"`
}

type ChannelMessage

type ChannelMessage struct {
	Position       int64                 `json:"position"`
	ID             string                `json:"id"`
	WhatsAppIDs    WhatsAppMessageIDs    `json:"whatsapp_ids"`
	WhatsAppID     string                `json:"whatsapp_id,omitempty"`
	Conversation   ConversationReference `json:"conversation"`
	Type           string                `json:"type"`
	Timestamp      string                `json:"timestamp"`
	Views          int64                 `json:"views"`
	ReactionCounts map[string]int64      `json:"reactionCounts"`
	Text           string                `json:"text,omitempty"`
}

type ChannelMessageUpdatesParams

type ChannelMessageUpdatesParams struct {
	Count int
	Since *int64
	After *int64
}

type ChannelMessagesParams

type ChannelMessagesParams struct {
	Count  int
	Before *int64
}

type ChannelReactionRequest

type ChannelReactionRequest struct {
	Reaction string `json:"reaction"`
}

type Channels

type Channels struct {
	// contains filtered or unexported fields
}

func (*Channels) Delete

func (*Channels) Follow

func (*Channels) List

func (*Channels) ListMessageUpdates

func (*Channels) ListMessages

func (*Channels) MarkMessageViewed

func (r *Channels) MarkMessageViewed(ctx context.Context, s, id, messageID string, o ...RequestOptions) (Response[Envelope[AsyncResult[ChannelActionResult]]], error)

func (*Channels) Mute

func (*Channels) ReactToMessage

func (*Channels) Retrieve

func (r *Channels) Retrieve(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[Channel]], error)

func (*Channels) SubscribeToLiveUpdates

func (r *Channels) SubscribeToLiveUpdates(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[AsyncResult[ChannelLiveUpdates]]], error)

func (*Channels) Unfollow

func (*Channels) Unmute

type ChatArchivePayload

type ChatArchivePayload struct {
	From    WebhookIdentity `json:"from"`
	Archive *bool           `json:"archive,omitempty"`
	Pinned  *bool           `json:"pinned,omitempty"`
	// contains filtered or unexported fields
}

type ChatClearPayload

type ChatClearPayload struct {
	From WebhookIdentity `json:"from"`
	// contains filtered or unexported fields
}

type ChatDeletePayload

type ChatDeletePayload struct {
	From WebhookIdentity `json:"from"`
	// contains filtered or unexported fields
}

type ChatMutePayload

type ChatMutePayload struct {
	From             WebhookIdentity `json:"from"`
	Muted            bool            `json:"muted"`
	MuteEndTimestamp *int64          `json:"muteEndTimestamp,omitempty"`
	// contains filtered or unexported fields
}

type ChatPresenceData

type ChatPresenceData struct {
	Policy                string `json:"policy"`
	Status                string `json:"status"`
	UnknownReason         string `json:"unknownReason,omitempty"`
	Available             *bool  `json:"available,omitempty"`
	LastSeen              string `json:"lastSeen,omitempty"`
	ObservedAt            string `json:"observedAt,omitempty"`
	SubscriptionExpiresAt string `json:"subscriptionExpiresAt,omitempty"`
	Stale                 bool   `json:"stale"`
	TypingPolicy          string `json:"typingPolicy"`
	TypingStatus          string `json:"typingStatus"`
	TypingUnknownReason   string `json:"typingUnknownReason,omitempty"`
	ChatState             *struct {
		Sender     string `json:"sender"`
		State      string `json:"state"`
		Media      string `json:"media,omitempty"`
		ObservedAt string `json:"observedAt"`
		Stale      bool   `json:"stale"`
	} `json:"chatState,omitempty"`
}

type ChatReadPayload

type ChatReadPayload struct {
	From WebhookIdentity `json:"from"`
	Read bool            `json:"read"`
	// contains filtered or unexported fields
}

type Chats

type Chats struct {
	// contains filtered or unexported fields
}

func (*Chats) Archive

func (r *Chats) Archive(ctx context.Context, s, id string, o ...RequestOptions) (Response[Success], error)

func (*Chats) DeleteMessage

func (r *Chats) DeleteMessage(ctx context.Context, s, id, message string, transport MessageTransport, opts ...RequestOptions) (Response[Success], error)

func (*Chats) DownloadMessageMedia

func (r *Chats) DownloadMessageMedia(ctx context.Context, s, id, message string, o ...RequestOptions) (Response[[]byte], error)

func (*Chats) DownloadMessageMediaStream

func (r *Chats) DownloadMessageMediaStream(ctx context.Context, s, id, message string, o ...RequestOptions) (*MediaDownload, error)

func (*Chats) DownloadMessageMediaToFile

func (r *Chats) DownloadMessageMediaToFile(ctx context.Context, connection, chat, message, path string, file MediaFileOptions, o ...RequestOptions) (APIMediaFileResult, error)

func (*Chats) EditMessage

func (r *Chats) EditMessage(ctx context.Context, s, id, message string, b EditMessageRequest, opts ...RequestOptions) (Response[Success], error)

func (*Chats) GetServiceWindow

func (r *Chats) GetServiceWindow(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[CustomerServiceWindow]], error)

func (*Chats) Retrieve

func (r *Chats) Retrieve(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[HistoryChat]], error)

func (*Chats) RetrieveMessage

func (r *Chats) RetrieveMessage(ctx context.Context, s, id, message string, o ...RequestOptions) (Response[Envelope[HistoryMessage]], error)

func (*Chats) SetDisappearingTimer

func (r *Chats) SetDisappearingTimer(ctx context.Context, s, id string, b DisappearingTimerRequest, o ...RequestOptions) (Response[Success], error)

func (*Chats) Unarchive

func (r *Chats) Unarchive(ctx context.Context, s, id string, o ...RequestOptions) (Response[Success], error)

type CheckCallRequest

type CheckCallRequest struct {
	Connection string `json:"connection"`
	To         string `json:"to"`
}

type CheckContactResult

type CheckContactResult struct {
	ConversationReference
	Exists bool `json:"exists"`
}

type ClientRules

type ClientRules struct {
	RecipientMode          string `json:"recipientMode"`
	AllowedActions         string `json:"allowedActions"`
	RateLimit              int    `json:"rateLimit"`
	MaxDaily               int    `json:"maxDaily"`
	AllowedOrigins         string `json:"allowedOrigins"`
	ConversationTTLSeconds *int   `json:"conversationTtlSeconds,omitempty"`
	MaxConcurrency         *int   `json:"maxConcurrency,omitempty"`
	MaxSetupsPerMinute     *int   `json:"maxSetupsPerMinute,omitempty"`
	AllowedNumber          string `json:"allowedNumber,omitempty"`
}

type ClientTokenValue

type ClientTokenValue struct {
	Token     string `json:"token"`
	ExpiresAt string `json:"expiresAt"`
}

func (ClientTokenValue) GoString

func (v ClientTokenValue) GoString() string

func (ClientTokenValue) String

func (v ClientTokenValue) String() string

type ClientTokens

type ClientTokens struct {
	// contains filtered or unexported fields
}

func (*ClientTokens) DeleteRules

func (r *ClientTokens) DeleteRules(ctx context.Context, s string, o ...RequestOptions) (Response[Success], error)

func (*ClientTokens) RetrieveRules

func (r *ClientTokens) RetrieveRules(ctx context.Context, s string, o ...RequestOptions) (Response[Envelope[ClientRules]], error)

func (*ClientTokens) UpdateRules

type CloudAccountStatusPayload

type CloudAccountStatusPayload struct {
	Source string          `json:"source"`
	Kind   string          `json:"kind"`
	WABAID string          `json:"wabaId,omitempty"`
	Value  PlatformPayload `json:"value"`
	// contains filtered or unexported fields
}

type CloudCatalogAttempt

type CloudCatalogAttempt struct {
	StartedAt     string  `json:"startedAt"`
	FinishedAt    *string `json:"finishedAt"`
	Outcome       string  `json:"outcome"`
	MetaErrorCode *int    `json:"metaErrorCode,omitempty"`
}

type CloudCatalogCacheList

type CloudCatalogCacheList struct {
	Catalogs []CloudCatalogSync `json:"catalogs"`
}

type CloudCatalogCacheProduct

type CloudCatalogCacheProduct struct {
	ID           string `json:"id"`
	RetailerID   string `json:"retailerId,omitempty"`
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	Price        string `json:"price,omitempty"`
	Currency     string `json:"currency,omitempty"`
	Availability string `json:"availability,omitempty"`
	ReviewStatus string `json:"reviewStatus,omitempty"`
	Visibility   string `json:"visibility,omitempty"`
	ImageURL     string `json:"imageUrl,omitempty"`
	URL          string `json:"url,omitempty"`
}

type CloudCatalogList

type CloudCatalogList struct {
	Data   []CloudProductCatalog `json:"data"`
	Paging *CloudGraphPaging     `json:"paging,omitempty"`
}

type CloudCatalogProduct

type CloudCatalogProduct struct {
	ID           string `json:"id"`
	RetailerID   string `json:"retailer_id,omitempty"`
	Name         string `json:"name,omitempty"`
	Availability string `json:"availability,omitempty"`
}

type CloudCatalogProductList

type CloudCatalogProductList struct {
	Data   []CloudCatalogProduct `json:"data"`
	Paging *CloudGraphPaging     `json:"paging,omitempty"`
}

type CloudCatalogProductPage

type CloudCatalogProductPage struct {
	Catalog    CloudCatalogSync           `json:"catalog"`
	Products   []CloudCatalogCacheProduct `json:"products"`
	NextCursor string                     `json:"nextCursor,omitempty"`
}

type CloudCatalogSync

type CloudCatalogSync struct {
	CatalogID    string              `json:"catalogId"`
	SyncedAt     *string             `json:"syncedAt"`
	Stale        bool                `json:"stale"`
	ProductCount int                 `json:"productCount"`
	LastAttempt  CloudCatalogAttempt `json:"lastAttempt"`
}

type CloudCatalogs

type CloudCatalogs struct {
	// contains filtered or unexported fields
}

func (*CloudCatalogs) List

func (*CloudCatalogs) ListProducts

type CloudCredentialHealth

type CloudCredentialHealth struct {
	Status      string  `json:"status"`
	CheckedAt   *string `json:"checkedAt"`
	NextCheckAt *string `json:"nextCheckAt"`
	Token       struct {
		Status    string  `json:"status"`
		ExpiresAt *string `json:"expiresAt"`
	} `json:"token"`
	MissingPermissions  []string `json:"missingPermissions"`
	PhoneRegistration   string   `json:"phoneRegistration"`
	WebhookSubscription string   `json:"webhookSubscription"`
	FailureCode         *string  `json:"failureCode"`
}

type CloudGraphCursors

type CloudGraphCursors struct {
	Before string `json:"before,omitempty"`
	After  string `json:"after,omitempty"`
}

type CloudGraphPaging

type CloudGraphPaging struct {
	Cursors CloudGraphCursors `json:"cursors"`
}

type CloudGraphVersion

type CloudGraphVersion struct{ Version string }

type CloudHistorySyncPayload

type CloudHistorySyncPayload struct {
	Kind  string          `json:"kind"`
	Value PlatformPayload `json:"value"`
	// contains filtered or unexported fields
}

type CloudMarketing

type CloudMarketing struct {
	// contains filtered or unexported fields
}

func (*CloudMarketing) GetStatus

func (*CloudMarketing) Status

type CloudMarketingOwnerBusiness

type CloudMarketingOwnerBusiness struct {
	MarketingMessagesOnboardingStatus *CloudMarketingTerms `json:"marketing_messages_onboarding_status,omitempty"`
}

type CloudMarketingStatus

type CloudMarketingStatus struct {
	OwnerBusinessInfo                  *CloudMarketingOwnerBusiness `json:"owner_business_info,omitempty"`
	DisableMarketingMessagesOnCloudAPI *bool                        `json:"disable_marketing_messages_on_cloud_api,omitempty"`
	ID                                 string                       `json:"id"`
	MarketingMessagesOnboardingStatus  string                       `json:"marketing_messages_onboarding_status,omitempty"`
}

type CloudMarketingTerms

type CloudMarketingTerms struct {
	Status string `json:"status,omitempty"`
	Time   string `json:"time,omitempty"`
}

type CloudMessagePayload

type CloudMessagePayload struct {
	Order *CloudOrder `json:"order,omitempty"`

	ID                 string                `json:"id"`
	WhatsAppIDs        WhatsAppMessageIDs    `json:"whatsapp_ids"`
	WhatsAppID         string                `json:"whatsapp_id,omitempty"`
	Conversation       WebhookConversation   `json:"conversation"`
	Timestamp          string                `json:"timestamp"`
	Type               string                `json:"type"`
	SenderName         string                `json:"senderName,omitempty"`
	NativeFlowResponse *NativeFlowResponse   `json:"nativeFlowResponse,omitempty"`
	ReplyChoice        *ReplyChoice          `json:"replyChoice,omitempty"`
	ParentMessageID    string                `json:"parentMessageId,omitempty"`
	Interactive        PlatformPayload       `json:"interactive,omitempty"`
	Referral           *CloudMessageReferral `json:"referral,omitempty"`
	Extra              PlatformPayload       `json:"-"`
	// contains filtered or unexported fields
}

func (CloudMessagePayload) MarshalJSON

func (v CloudMessagePayload) MarshalJSON() ([]byte, error)

func (*CloudMessagePayload) UnmarshalJSON

func (v *CloudMessagePayload) UnmarshalJSON(b []byte) error

type CloudMessageReferral

type CloudMessageReferral struct {
	SourceType string          `json:"source_type,omitempty"`
	SourceID   string          `json:"source_id,omitempty"`
	SourceURL  string          `json:"source_url,omitempty"`
	CTWAClid   string          `json:"ctwa_clid,omitempty"`
	Extra      PlatformPayload `json:"-"`
}

func (CloudMessageReferral) MarshalJSON

func (v CloudMessageReferral) MarshalJSON() ([]byte, error)

func (*CloudMessageReferral) UnmarshalJSON

func (v *CloudMessageReferral) UnmarshalJSON(b []byte) error

type CloudOnboarding

type CloudOnboarding struct {
	// contains filtered or unexported fields
}

func (*CloudOnboarding) Advance

func (r *CloudOnboarding) Advance(ctx context.Context, b EmbeddedSignupRequest, o ...RequestOptions) (Response[Envelope[struct {
	Stage string `json:"stage"`
}]], error)

type CloudOrder

type CloudOrder struct {
	CatalogID string           `json:"catalogId"`
	Text      string           `json:"text,omitempty"`
	Items     []CloudOrderItem `json:"items"`
}

type CloudOrderItem

type CloudOrderItem struct {
	ProductRetailerID string  `json:"productRetailerId"`
	Quantity          int     `json:"quantity"`
	ItemPrice         float64 `json:"itemPrice"`
	Currency          string  `json:"currency"`
}

type CloudProductCatalog

type CloudProductCatalog struct {
	ID   string `json:"id"`
	Name string `json:"name,omitempty"`
}

type CloudReauthorization

type CloudReauthorization struct {
	QuickLinkID string `json:"quicklinkId"`
	URL         string `json:"url"`
	Connection  string `json:"connection"`
}

type CloudSyncRequest

type CloudSyncRequest struct {
	Request         string `json:"request"`
	ReceiptRecorded bool   `json:"receiptRecorded"`
	Delivery        string `json:"delivery,omitempty"`
}

type CloudSyncStatus

type CloudSyncStatus struct {
	Contacts CloudSyncRequest `json:"contacts"`
	History  CloudSyncRequest `json:"history"`
}

type CloudTemplate

type CloudTemplate struct {
	ID              string            `json:"id"`
	TenantID        string            `json:"tenantId"`
	Connection      string            `json:"connection"`
	WABAID          string            `json:"wabaId"`
	Name            string            `json:"name"`
	Language        string            `json:"language"`
	Category        string            `json:"category"`
	Status          string            `json:"status"`
	Components      []json.RawMessage `json:"components"`
	MetaTemplateID  string            `json:"metaTemplateId,omitempty"`
	RejectionReason string            `json:"rejectionReason,omitempty"`
	QualityScore    string            `json:"qualityScore,omitempty"`
	CreatedAt       string            `json:"createdAt"`
	UpdatedAt       string            `json:"updatedAt"`
}

type CloudTemplateStatusPayload

type CloudTemplateStatusPayload struct {
	Kind                 string `json:"kind"`
	Event                string `json:"event,omitempty"`
	TemplateID           string `json:"templateId,omitempty"`
	TemplateName         string `json:"templateName,omitempty"`
	Language             string `json:"language,omitempty"`
	Reason               string `json:"reason,omitempty"`
	PreviousQualityScore string `json:"previousQualityScore,omitempty"`
	NewQualityScore      string `json:"newQualityScore,omitempty"`
	WABAID               string `json:"wabaId,omitempty"`
	// contains filtered or unexported fields
}

type CloudTemplates

type CloudTemplates struct {
	// contains filtered or unexported fields
}

func (*CloudTemplates) Delete

func (r *CloudTemplates) Delete(ctx context.Context, s, name string, o ...RequestOptions) (Response[Success], error)

func (*CloudTemplates) List

func (*CloudTemplates) Retrieve

func (r *CloudTemplates) Retrieve(ctx context.Context, s, name, language string, o ...RequestOptions) (Response[Envelope[CloudTemplate]], error)

func (*CloudTemplates) Update

type CommandResultPayload

type CommandResultPayload struct {
	RequestID string          `json:"requestId"`
	Command   string          `json:"command"`
	Success   bool            `json:"success"`
	Data      PlatformPayload `json:"data,omitempty"`
	Error     string          `json:"error,omitempty"`
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Credential        Credential
	BaseURL           string
	APIVersion        string
	Timeout           *time.Duration
	MaxNetworkRetries *int
	HTTPClient        *http.Client
}

type ConfigurationSource

type ConfigurationSource string

type ConfigurationValueSource

type ConfigurationValueSource string

type ConfirmPasskeyRequest

type ConfirmPasskeyRequest struct {
	TicketID string  `json:"ticketId"`
	Code     *string `json:"code,omitempty"`
}

type Connection

type Connection struct {
	SignalMode     *SignalCustodyMode           `json:"signalMode,omitempty"`
	ConnectionID   string                       `json:"connectionId"`
	Name           string                       `json:"name"`
	ExternalID     string                       `json:"externalId,omitempty"`
	TenantID       string                       `json:"tenantId"`
	Type           ConnectionType               `json:"type"`
	Method         ConnectionMethod             `json:"method"`
	PhoneNumberID  string                       `json:"phoneNumberId,omitempty"`
	TestMode       bool                         `json:"testMode"`
	Status         string                       `json:"status"`
	StatusReason   string                       `json:"statusReason,omitempty"`
	Configuration  *ConnectionConfigurationView `json:"configuration,omitempty"`
	NewChatCapping *NewChatCapping              `json:"newChatCapping,omitempty"`
	CreatedAt      string                       `json:"createdAt"`
	UpdatedAt      string                       `json:"updatedAt"`
	OperationID    string                       `json:"operationId,omitempty"`
}

func (*Connection) UnmarshalJSON

func (v *Connection) UnmarshalJSON(b []byte) error

type ConnectionBan

type ConnectionBan struct {
	ID             string  `json:"id"`
	ConnectionName string  `json:"connectionName"`
	BanCode        *int    `json:"banCode"`
	BanReason      *string `json:"banReason"`
	BanExpiresAt   *int64  `json:"banExpiresAt"`
	OccurredAt     int64   `json:"occurredAt"`
	Status         string  `json:"status"`
}

type ConnectionBans

type ConnectionBans struct {
	// contains filtered or unexported fields
}

func (*ConnectionBans) List

func (*ConnectionBans) ListActive

type ConnectionBatchRemoveResult

type ConnectionBatchRemoveResult struct {
	Removed int `json:"removed"`
}

type ConnectionBatchRequest

type ConnectionBatchRequest struct {
	ProjectID     string   `json:"projectId,omitempty"`
	ConnectionIDs []string `json:"connectionIds"`
}

type ConnectionBatchStopResult

type ConnectionBatchStopResult struct {
	Stopping int `json:"stopping"`
}

type ConnectionCallRecord

type ConnectionCallRecord struct {
	CallID          string    `json:"callId"`
	ProjectID       string    `json:"projectId"`
	ConnectionID    string    `json:"connectionId"`
	Direction       string    `json:"direction"`
	Upstream        string    `json:"upstream"`
	Outcome         string    `json:"outcome"`
	State           string    `json:"state"`
	HasVideo        bool      `json:"hasVideo"`
	Peer            *CallPeer `json:"peer"`
	StartedAt       string    `json:"startedAt"`
	ConnectedAt     *string   `json:"connectedAt"`
	EndedAt         *string   `json:"endedAt"`
	DurationSeconds *int      `json:"durationSeconds"`
	EndReason       *string   `json:"endReason"`
}

ConnectionCallRecord is one call on a Connection, read from the Connection's data region.

type ConnectionCallSettings

type ConnectionCallSettings struct {
	// Read-only server projection. Nil is not a coverage guarantee.
	SimultaneousCallsCoverageExcludedUntil *string `json:"simultaneousCallsCoverageExcludedUntil"`
	SimultaneousCalls                      bool    `json:"simultaneousCalls"`
	CallsEnabled                           bool    `json:"callsEnabled"`
	ConferenceMode                         bool    `json:"conferenceMode"`
	InboundRoute                           string  `json:"inboundRoute"`
	SIPTrunkID                             *string `json:"sipTrunkId"`
	SIPClaim                               bool    `json:"sipClaim"`
	HostCloudAPICalls                      bool    `json:"hostCloudApiCalls"`
	Revision                               int64   `json:"revision"`
	UpdatedAt                              *string `json:"updatedAt"`
}

type ConnectionCalls

type ConnectionCalls struct {
	// contains filtered or unexported fields
}

ConnectionCalls reads a Connection's call history with the other party's identity. Client tokens need the read_calls action.

func (*ConnectionCalls) List

List returns one page of the Connection's calls, newest first.

type ConnectionCallsPage

type ConnectionCallsPage struct {
	Success    bool                   `json:"success"`
	Data       []ConnectionCallRecord `json:"data"`
	NextCursor *string                `json:"nextCursor"`
}

ConnectionCallsPage is one page of a Connection's calls, newest first.

type ConnectionCapabilities

type ConnectionCapabilities struct {
	Connection   string                 `json:"connection"`
	ProjectID    string                 `json:"projectId"`
	Status       string                 `json:"status"`
	SyncedAt     *string                `json:"syncedAt"`
	CheckedAt    *string                `json:"checkedAt"`
	AccountType  *string                `json:"accountType"`
	Capabilities []ConnectionCapability `json:"capabilities"`
}

type ConnectionCapabilitiesUpdatedPayload

type ConnectionCapabilitiesUpdatedPayload struct {
	ConnectionCapabilities
	ChangedKeys []string `json:"changedKeys"`
	// contains filtered or unexported fields
}

type ConnectionCapability

type ConnectionCapability struct {
	Key          string  `json:"key"`
	Source       *string `json:"source"`
	Kind         string  `json:"kind"`
	Unit         *string `json:"unit"`
	FeatureValue *bool   `json:"-"`
	LimitValue   *int64  `json:"-"`
}

ConnectionCapability keeps unknown capability keys while narrowing value by kind.

func (ConnectionCapability) MarshalJSON

func (c ConnectionCapability) MarshalJSON() ([]byte, error)

func (*ConnectionCapability) UnmarshalJSON

func (c *ConnectionCapability) UnmarshalJSON(b []byte) error

type ConnectionConfigurationOverrides

type ConnectionConfigurationOverrides struct {
	Observation *ObservationConfiguration `json:"observation,omitempty"`
	HistorySync *HistorySyncPolicyPatch   `json:"historySync,omitempty"`
	HMS         *HMSConfiguration         `json:"hms,omitempty"`
}

type ConnectionConfigurationPatch

type ConnectionConfigurationPatch struct {
	Set   *ConnectionConfigurationOverrides `json:"set,omitempty"`
	Reset []string                          `json:"reset,omitempty"`
}

type ConnectionConfigurationResource

type ConnectionConfigurationResource struct {
	// contains filtered or unexported fields
}

func (*ConnectionConfigurationResource) Retrieve

type ConnectionConfigurationSources

type ConnectionConfigurationSources struct {
	HistorySyncMode        ConfigurationValueSource `json:"historySync.mode"`
	HistorySyncRequestFull ConfigurationValueSource `json:"historySync.requestFull"`
	HistorySyncDelivery    *ConfigurationSource     `json:"historySync.delivery,omitempty"`
	HMS                    ConfigurationSource      `json:"hms"`
	PresenceMode           ConfigurationSource      `json:"observation.presenceMode"`
	TypingMode             ConfigurationSource      `json:"observation.typingMode"`
	LabelMode              ConfigurationSource      `json:"observation.labelMode"`
	QuickReplyMode         ConfigurationSource      `json:"observation.quickReplyMode"`
}

func (*ConnectionConfigurationSources) UnmarshalJSON

func (v *ConnectionConfigurationSources) UnmarshalJSON(b []byte) error

type ConnectionConfigurationView

type ConnectionConfigurationView struct {
	Effective        EffectiveConnectionConfiguration `json:"effective"`
	Overrides        ConnectionConfigurationOverrides `json:"overrides"`
	Sources          ConnectionConfigurationSources   `json:"sources"`
	RequestedHistory HistorySyncPolicy                `json:"requestedHistory"`
	HistoryConsent   string                           `json:"historyConsent,omitempty"`
	Revisions        struct {
		Team       int `json:"team"`
		Project    int `json:"project"`
		Connection int `json:"connection"`
	} `json:"revisions"`
	Application *struct {
		DesiredGeneration int    `json:"desiredGeneration"`
		AppliedGeneration int    `json:"appliedGeneration"`
		Status            string `json:"status"`
	} `json:"application,omitempty"`
}

type ConnectionConnectedPayload

type ConnectionConnectedPayload struct {
	PhoneNumber   string `json:"phoneNumber"`
	ID            string `json:"id,omitempty"`
	PushName      string `json:"pushName"`
	PhonePlatform string `json:"phonePlatform"`
	AccountType   string `json:"accountType"`
	BusinessName  string `json:"businessName,omitempty"`
	// contains filtered or unexported fields
}

type ConnectionHybridTransition

type ConnectionHybridTransition struct {
	Action                      string  `json:"action"`
	SurvivingConnectionID       string  `json:"survivingConnectionId"`
	Status                      string  `json:"status,omitempty"`
	FailureReason               *string `json:"failureReason,omitempty"`
	MetaDisconnectRequired      *bool   `json:"metaDisconnectRequired,omitempty"`
	EffectiveAtMs               *int64  `json:"effectiveAtMs,omitempty"`
	KeepTransport               string  `json:"keepTransport,omitempty"`
	ExistingConnectionTransport string  `json:"existingConnectionTransport,omitempty"`
	NewConnectionName           string  `json:"newConnectionName,omitempty"`
	NewConnectionID             string  `json:"newConnectionId,omitempty"`
	AbsorbConnectionID          string  `json:"absorbConnectionId,omitempty"`
}

type ConnectionLifecycleResult

type ConnectionLifecycleResult struct {
	Starting     bool   `json:"starting,omitempty"`
	Stopping     bool   `json:"stopping,omitempty"`
	Removed      bool   `json:"removed,omitempty"`
	ConnectionID string `json:"connectionId"`
}

type ConnectionLoggedOutPayload

type ConnectionLoggedOutPayload struct {
	Reason string `json:"reason"`
	Code   int    `json:"code"`
	// contains filtered or unexported fields
}

type ConnectionMethod

type ConnectionMethod string
const (
	ConnectionMethodLinkedDevice ConnectionMethod = "linked_device"
	ConnectionMethodCloudAPI     ConnectionMethod = "cloud_api"
	ConnectionMethodHybrid       ConnectionMethod = "hybrid"
)

type ConnectionObservationPolicy

type ConnectionObservationPolicy struct {
	ConnectionName string            `json:"connectionName"`
	ProjectID      string            `json:"projectId"`
	Project        ObservationValues `json:"project"`
	Override       ObservationValues `json:"override"`
	Effective      ObservationValues `json:"effective"`
}

type ConnectionPhoneOfflinePayload

type ConnectionPhoneOfflinePayload struct {
	DaysSinceLastSeen int    `json:"daysSinceLastSeen"`
	DaysRemaining     int    `json:"daysRemaining"`
	LastSeen          string `json:"lastSeen"`
	Action            string `json:"action"`
	// contains filtered or unexported fields
}

type ConnectionProjectContext

type ConnectionProjectContext struct {
	ProjectID string `json:"projectId,omitempty"`
}

type ConnectionRemoveResult

type ConnectionRemoveResult struct {
	Removed      bool   `json:"removed"`
	ConnectionID string `json:"connectionId"`
}

type ConnectionRestrictionUpdatedPayload

type ConnectionRestrictionUpdatedPayload struct {
	Type            string  `json:"type"`
	Active          bool    `json:"active"`
	EnforcementType *string `json:"enforcementType"`
	ExpiresAt       *string `json:"expiresAt"`
	ObservedAt      string  `json:"observedAt"`
	// contains filtered or unexported fields
}

type ConnectionSafeMode

type ConnectionSafeMode struct {
	Connection        string           `json:"connection"`
	ProjectID         string           `json:"projectId"`
	Project           SafeModeSettings `json:"project"`
	Override          SafeModeOverride `json:"override"`
	Effective         SafeModeSettings `json:"effective"`
	Applied           *SafeModeApplied `json:"applied"`
	Mismatch          bool             `json:"mismatch"`
	Entitled          bool             `json:"entitled"`
	EntitlementReason *string          `json:"entitlementReason"`
}

type ConnectionStartResult

type ConnectionStartResult struct {
	Starting     bool   `json:"starting"`
	ConnectionID string `json:"connectionId"`
}

type ConnectionStopResult

type ConnectionStopResult struct {
	Stopping     bool   `json:"stopping"`
	ConnectionID string `json:"connectionId"`
}

type ConnectionTierChange

type ConnectionTierChange struct {
	ID            string              `json:"id"`
	Status        string              `json:"status"`
	FailureReason *string             `json:"failureReason"`
	ExpiresAtMs   int64               `json:"expiresAtMs"`
	Quote         ConnectionTierQuote `json:"quote"`
}

type ConnectionTierOverrideRequest

type ConnectionTierOverrideRequest struct {
	ProjectID string `json:"projectId,omitempty"`
	QuoteID   string `json:"quoteId"`
}

type ConnectionTierQuote

type ConnectionTierQuote struct {
	Tier             string                      `json:"tier"`
	TierOverride     *string                     `json:"tierOverride"`
	AmountCents      float64                     `json:"amountCents"`
	PriceVersion     string                      `json:"priceVersion"`
	Action           string                      `json:"action"`
	EffectiveAtMs    int64                       `json:"effectiveAtMs"`
	ReplacesWindowID *string                     `json:"replacesWindowId"`
	HybridTransition *ConnectionHybridTransition `json:"hybridTransition,omitempty"`
}

type ConnectionTierQuoteRequest

type ConnectionTierQuoteRequest struct {
	ProjectID        string            `json:"projectId,omitempty"`
	TierOverride     *string           `json:"tierOverride"`
	HybridResolution *HybridResolution `json:"hybridResolution,omitempty"`
	HybridMerge      *HybridMerge      `json:"hybridMerge,omitempty"`
}

type ConnectionType

type ConnectionType string
const ConnectionTypeWhatsApp ConnectionType = "whatsapp"

type Contact

type Contact struct {
	ConversationReference
	Name         string `json:"name"`
	PushName     string `json:"pushName"`
	BusinessName string `json:"businessName,omitempty"`
	ProfileURL   string `json:"profileUrl,omitempty"`
}

type ContactBlocklist

type ContactBlocklist struct {
	Hash     string                  `json:"hash"`
	Contacts []ConversationReference `json:"contacts"`
}

type ContactContent

type ContactContent struct {
	VCard string `json:"vcard"`
}

type ContactIdentityChange

type ContactIdentityChange struct {
	Reason    string                   `json:"reason"`
	MessageID string                   `json:"messageId"`
	Previous  *ContactPreviousIdentity `json:"previous,omitempty"`
}

type ContactMarketingPreferencePayload

type ContactMarketingPreferencePayload struct {
	WAID          string `json:"waId"`
	Preference    string `json:"preference"`
	Category      string `json:"category"`
	PhoneNumberID string `json:"phoneNumberId,omitempty"`
	// contains filtered or unexported fields
}

type ContactOptPayload

type ContactOptPayload struct {
	Phone      string `json:"phone"`
	Source     string `json:"source"`
	Keyword    string `json:"keyword"`
	Connection string `json:"connection"`
	ProjectID  string `json:"projectId,omitempty"`
	// contains filtered or unexported fields
}

type ContactPicture

type ContactPicture struct {
	URL string `json:"url"`
}

type ContactPreviousIdentity

type ContactPreviousIdentity struct {
	ID          *string `json:"id,omitempty"`
	BSUID       *string `json:"bsuid,omitempty"`
	ParentBSUID *string `json:"parentBsuid,omitempty"`
}

type ContactUpdatePayload

type ContactUpdatePayload struct {
	IdentityChange *ContactIdentityChange `json:"identityChange,omitempty"`
	ParentBSUID    string                 `json:"parentBsuid,omitempty"`

	ID              string `json:"id"`
	PhoneNumber     string `json:"phoneNumber,omitempty"`
	BSUID           string `json:"bsuid,omitempty"`
	FullName        string `json:"fullName,omitempty"`
	FirstName       string `json:"firstName,omitempty"`
	PushName        string `json:"pushName,omitempty"`
	OldPushName     string `json:"oldPushName,omitempty"`
	BusinessName    string `json:"businessName,omitempty"`
	OldBusinessName string `json:"oldBusinessName,omitempty"`
	PictureID       string `json:"pictureId,omitempty"`
	PictureRemoved  *bool  `json:"pictureRemoved,omitempty"`
	Username        string `json:"username,omitempty"`
	// contains filtered or unexported fields
}

type ContactUserInfo

type ContactUserInfo struct {
	ConversationReference
	Status       string `json:"status"`
	PictureID    string `json:"pictureId"`
	VerifiedName string `json:"verifiedName"`
	Devices      []struct {
		ConversationReference
		Device int `json:"device"`
	} `json:"devices"`
}

type Contacts

type Contacts struct {
	// contains filtered or unexported fields
}

func (*Contacts) Block

func (r *Contacts) Block(ctx context.Context, s, id string, o ...RequestOptions) (Response[Success], error)

func (*Contacts) Blocklist

func (*Contacts) BusinessProfile

func (r *Contacts) BusinessProfile(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[BusinessProfile]], error)

func (*Contacts) Check

func (r *Contacts) Check(ctx context.Context, s string, phones []string, o ...RequestOptions) (Response[Envelope[[]CheckContactResult]], error)

func (*Contacts) Devices

func (r *Contacts) Devices(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[[]string]], error)

func (*Contacts) Info

func (*Contacts) List

func (*Contacts) Picture

func (*Contacts) Retrieve

func (r *Contacts) Retrieve(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[Contact]], error)

func (*Contacts) Unblock

func (r *Contacts) Unblock(ctx context.Context, s, id string, o ...RequestOptions) (Response[Success], error)

type ContactsSyncPayload

type ContactsSyncPayload struct {
	Kind  string          `json:"kind"`
	Value PlatformPayload `json:"value"`
	// contains filtered or unexported fields
}

type ConversationReference

type ConversationReference struct {
	ParentBSUID string `json:"parentBsuid,omitempty"`
	ID          string `json:"id,omitempty"`
	PhoneNumber string `json:"phoneNumber,omitempty"`
	BSUID       string `json:"bsuid,omitempty"`
	Username    string `json:"username,omitempty"`
}

ConversationReference accepts public IDs, E.164 phone numbers, or BSUIDs.

type CreateAudienceFromCampaignRequest

type CreateAudienceFromCampaignRequest struct {
	Name       string                  `json:"name"`
	CampaignID string                  `json:"campaignId"`
	Outcome    CampaignRetargetOutcome `json:"outcome"`
	ProjectID  *string                 `json:"projectId,omitempty"`
}

type CreateAudienceProfileImportRequest

type CreateAudienceProfileImportRequest struct {
	ReplayKey string                        `json:"replayKey"`
	CSVBase64 string                        `json:"csvBase64"`
	Mapping   *AudienceProfileImportMapping `json:"mapping,omitempty"`
}

type CreateAudienceRequest

type CreateAudienceRequest struct {
	Name    string                    `json:"name"`
	Source  string                    `json:"source,omitempty"`
	Members *[]CampaignRecipientInput `json:"members,omitempty"`
	FileID  string                    `json:"fileId,omitempty"`
	Mapping *AudienceImportMapping    `json:"mapping,omitempty"`
}

type CreateAudienceSegmentRequest

type CreateAudienceSegmentRequest struct {
	Name  string               `json:"name"`
	Rules AudienceSegmentRules `json:"rules"`
}

type CreateCallLinkRequest

type CreateCallLinkRequest struct {
	Connection string `json:"connection"`
	Video      *bool  `json:"video,omitempty"`
}

type CreateCallOptOutRequest

type CreateCallOptOutRequest struct {
	PhoneNumber string `json:"phoneNumber,omitempty"`
	BSUID       string `json:"bsuid,omitempty"`
	Note        string `json:"note,omitempty"`
}

type CreateCampaignReplyFlowRequest

type CreateCampaignReplyFlowRequest struct {
	Name       string                      `json:"name"`
	Definition CampaignReplyFlowDefinition `json:"definition"`
	FlowKey    *string                     `json:"flowKey,omitempty"`
	Revision   *int64                      `json:"revision,omitempty"`
}

type CreateCampaignRequest

type CreateCampaignRequest struct {
	VariableMapping   *CampaignVariableMapping              `json:"variableMapping,omitempty"`
	TrackedLinks      *Nullable[CampaignTrackedLinks]       `json:"trackedLinks,omitempty"`
	Name              string                                `json:"name"`
	TemplateID        string                                `json:"templateId,omitempty"`
	RecipientListID   string                                `json:"recipientListId,omitempty"`
	SenderConfig      PlatformPayload                       `json:"senderConfig,omitempty"`
	ScheduledAt       *int64                                `json:"scheduledAt,omitempty"`
	SendWindow        *Nullable[CampaignSendWindowRequest]  `json:"sendWindow,omitempty"`
	Recipients        []CampaignRecipientInput              `json:"recipients,omitempty"`
	MessageVariations *Nullable[[]CampaignMessageVariation] `json:"messageVariations,omitempty"`
	Variants          *Nullable[[]CampaignVariant]          `json:"variants,omitempty"`
	VariantStrategy   *Nullable[CampaignVariantStrategy]    `json:"variantStrategy,omitempty"`
	FollowUp          *Nullable[CampaignFollowUp]           `json:"followUp,omitempty"`
	// FrequencyCap is a beta campaign cap stricter than the team cap; null uses the team cap.
	FrequencyCap *Nullable[CampaignFrequencyCap] `json:"frequencyCap,omitempty"`
	// Drip is beta; null creates an ordinary campaign.
	Drip *Nullable[CampaignDripInput] `json:"drip,omitempty"`
}

func (*CreateCampaignRequest) UnmarshalJSON

func (v *CreateCampaignRequest) UnmarshalJSON(b []byte) error

type CreateChannelRequest

type CreateChannelRequest struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Picture     string `json:"picture,omitempty"`
}

type CreateCloudTemplateRequest

type CreateCloudTemplateRequest struct {
	Name       string            `json:"name"`
	Language   string            `json:"language"`
	Category   string            `json:"category"`
	Components []json.RawMessage `json:"components"`
}

type CreateCustomerPairingLinkRequest

type CreateCustomerPairingLinkRequest struct {
	ProjectID        string            `json:"projectId,omitempty"`
	ExpectedPhone    *Nullable[string] `json:"expectedPhone,omitempty"`
	Methods          *[]string         `json:"methods,omitempty"`
	ExpiresInSeconds *int              `json:"expiresInSeconds,omitempty"`
}

type CreateCustomerRequest

type CreateCustomerRequest struct {
	ProjectID          string            `json:"projectId,omitempty"`
	Name               *Nullable[string] `json:"name,omitempty"`
	ExternalCustomerID *Nullable[string] `json:"externalCustomerId,omitempty"`
}

type CreateFlowRequest

type CreateFlowRequest struct {
	DraftID    string                     `json:"draftId,omitempty"`
	Name       string                     `json:"name"`
	Definition map[string]json.RawMessage `json:"definition"`
}

type CreateFunctionDeploymentRequest

type CreateFunctionDeploymentRequest struct {
	DeploymentID      string   `json:"deploymentId"`
	Source            string   `json:"source"`
	Language          string   `json:"language"`
	Region            string   `json:"region"`
	CompatibilityDate string   `json:"compatibilityDate"`
	SecretVersionIDs  []string `json:"secretVersionIds,omitempty"`
	EgressOrigins     []string `json:"egressOrigins,omitempty"`
}

type CreateFunctionInvocationRequest

type CreateFunctionInvocationRequest struct {
	DeploymentID string          `json:"deploymentId,omitempty"`
	Request      FunctionRequest `json:"request"`
	Trigger      string          `json:"trigger,omitempty"`
}

type CreateFunctionRequest

type CreateFunctionRequest struct {
	FunctionID string `json:"functionId,omitempty"`
	Name       string `json:"name"`
}

type CreateFunctionSecretRequest

type CreateFunctionSecretRequest struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

func (CreateFunctionSecretRequest) GoString

func (r CreateFunctionSecretRequest) GoString() string

func (CreateFunctionSecretRequest) String

type CreateGroupRequest

type CreateGroupRequest struct {
	Name         string   `json:"name"`
	Participants []string `json:"participants"`
}

type CreateLabelRequest

type CreateLabelRequest struct {
	Name  string `json:"name"`
	Color *int   `json:"color,omitempty"`
}

type CreateMessagingWebhookRequest

type CreateMessagingWebhookRequest struct {
	Connection string              `json:"connection,omitempty"`
	URL        string              `json:"url"`
	Events     *[]string           `json:"events,omitempty"`
	HMACKey    string              `json:"hmacKey,omitempty"`
	Retries    *WebhookRetryConfig `json:"retries,omitempty"`
	Headers    *[]WebhookHeader    `json:"headers,omitempty"`
	Format     string              `json:"format,omitempty"`
}

func (CreateMessagingWebhookRequest) GoString

func (CreateMessagingWebhookRequest) String

type CreateOfficialGroupRequest

type CreateOfficialGroupRequest struct {
	Subject              string `json:"subject"`
	Description          string `json:"description,omitempty"`
	JoinApprovalRequired *bool  `json:"joinApprovalRequired,omitempty"`
}

type CreatePlatformCampaignReplyFlowRequest

type CreatePlatformCampaignReplyFlowRequest struct {
	CreateCampaignReplyFlowRequest
	ProjectID string `json:"projectId"`
}

type CreatePlatformCampaignRequest

type CreatePlatformCampaignRequest struct {
	VariableMapping   *CampaignVariableMapping             `json:"variableMapping,omitempty"`
	TrackedLinks      *Nullable[CampaignTrackedLinks]      `json:"trackedLinks,omitempty"`
	ProjectID         string                               `json:"projectId"`
	Name              string                               `json:"name"`
	TemplateID        string                               `json:"templateId,omitempty"`
	RecipientListID   string                               `json:"recipientListId,omitempty"`
	SenderConfig      PlatformPayload                      `json:"senderConfig,omitempty"`
	ScheduledAt       *int64                               `json:"scheduledAt,omitempty"`
	SendWindow        *Nullable[CampaignSendWindowRequest] `json:"sendWindow,omitempty"`
	Recipients        []CampaignRecipientInput             `json:"recipients,omitempty"`
	RecipientCount    *int                                 `json:"recipientCount,omitempty"`
	ComposerBlueprint json.RawMessage                      `json:"composerBlueprint,omitempty"`
	MessagesArray     *[]CampaignComposedMessage           `json:"messagesArray,omitempty"`
	AudienceRef       json.RawMessage                      `json:"audienceRef,omitempty"`
	ComplianceConfig  json.RawMessage                      `json:"complianceConfig,omitempty"`
	Variants          []CampaignVariant                    `json:"variants,omitempty"`
	VariantStrategy   *CampaignVariantStrategy             `json:"variantStrategy,omitempty"`
	MessageVariations []CampaignMessageVariation           `json:"messageVariations,omitempty"`
	FollowUp          *Nullable[CampaignFollowUp]          `json:"followUp,omitempty"`
	FrequencyCap      *Nullable[CampaignFrequencyCap]      `json:"frequencyCap,omitempty"`
	// SegmentID is a beta saved segment evaluated at launch. The create schema
	// permits omission, not null, and cannot combine it with RecipientListID.
	SegmentID string                       `json:"segmentId,omitempty"`
	Drip      *Nullable[CampaignDripInput] `json:"drip,omitempty"`
}

func (*CreatePlatformCampaignRequest) UnmarshalJSON

func (v *CreatePlatformCampaignRequest) UnmarshalJSON(b []byte) error

type CreateProjectRequest

type CreateProjectRequest struct {
	Name        string       `json:"name"`
	Icon        *ProjectIcon `json:"icon,omitempty"`
	DefaultTier string       `json:"defaultTier,omitempty"`
}

type CreateProjectTemplateRequest

type CreateProjectTemplateRequest struct {
	Name         string             `json:"name"`
	Definition   TemplateDefinition `json:"definition"`
	SampleValues map[string]string  `json:"sampleValues,omitempty"`
}

type CreateQuickLinkRequest

type CreateQuickLinkRequest struct {
	SignalMode      *SignalCustodyMode      `json:"signalMode,omitempty"`
	BillingControls *BillingControls        `json:"billingControls,omitempty"`
	Purpose         string                  `json:"purpose,omitempty"`
	Connection      string                  `json:"connection,omitempty"`
	ConnectionGoal  string                  `json:"connectionGoal,omitempty"`
	AddMethod       string                  `json:"addMethod,omitempty"`
	ProjectID       string                  `json:"projectId,omitempty"`
	CustomerID      string                  `json:"customerId,omitempty"`
	ExternalID      string                  `json:"externalId,omitempty"`
	Configuration   *QuickLinkConfiguration `json:"configuration,omitempty"`
}

func (*CreateQuickLinkRequest) UnmarshalJSON

func (v *CreateQuickLinkRequest) UnmarshalJSON(b []byte) error

Reject unknown aliases and null named fields before decoding can discard them.

type CreateSIPTrunkRequest

type CreateSIPTrunkRequest struct {
	Name               string            `json:"name"`
	Enabled            *bool             `json:"enabled,omitempty"`
	Direction          string            `json:"direction"`
	Outbound           *SIPOutboundInput `json:"outbound,omitempty"`
	Inbound            *SIPInboundInput  `json:"inbound,omitempty"`
	Codecs             *[]string         `json:"codecs,omitempty"`
	MaxConcurrentCalls *int              `json:"maxConcurrentCalls,omitempty"`
}

type CreateVoiceAudioUploadRequest

type CreateVoiceAudioUploadRequest struct {
	Name          string `json:"name"`
	ContentType   string `json:"contentType"`
	SizeBytes     int64  `json:"sizeBytes"`
	RetentionDays *int   `json:"retentionDays,omitempty"`
}

type CreateVoiceProviderCredentialRequest

type CreateVoiceProviderCredentialRequest struct {
	Provider  string            `json:"provider"`
	Label     string            `json:"label"`
	APIKey    string            `json:"apiKey"`
	ProjectID *Nullable[string] `json:"projectId,omitempty"`
}

func (CreateVoiceProviderCredentialRequest) GoString

func (CreateVoiceProviderCredentialRequest) String

type CreateWebhookRequest

type CreateWebhookRequest struct {
	Batching    *WebhookBatchingInput `json:"batching,omitempty"`
	URL         string                `json:"url"`
	EventTypes  []string              `json:"eventTypes"`
	Enabled     *bool                 `json:"enabled,omitempty"`
	Format      string                `json:"format,omitempty"`
	RetryPolicy *WebhookRetryPolicy   `json:"retryPolicy,omitempty"`
	Headers     []WebhookHeaderInput  `json:"headers,omitempty"`
}
type CreatedCallLink struct {
	Connection string `json:"connection"`
	Token      string `json:"token"`
	URL        string `json:"url"`
	Video      bool   `json:"video"`
}
type CreatedCustomerPairingLink struct {
	CustomerPairingLink
	URL *string `json:"url"`
}

type Credential

type Credential struct {
	Kind  CredentialKind
	Value string
}

func (Credential) GoString

func (c Credential) GoString() string

func (Credential) String

func (c Credential) String() string

String deliberately redacts the bearer credential.

type CredentialKind

type CredentialKind string
const (
	TeamAPIKey   CredentialKind = "teamApiKey"
	ProjectToken CredentialKind = "projectToken"
	ClientToken  CredentialKind = "clientToken"
)

type CursorEnvelope

type CursorEnvelope[T any] struct {
	Data []T `json:"data"`
	Page struct {
		NextCursor *string `json:"nextCursor"`
		HasMore    bool    `json:"hasMore"`
	} `json:"page"`
}

type CursorPage

type CursorPage[T any] struct {
	Items         []T
	NextCursor    string
	NextOffset    string
	HighWatermark string
	Metadata      Metadata
	// contains filtered or unexported fields
}

CursorPage supports manual NextPage and lazy All iteration. It does not fetch another page until the consumer asks for it.

func PaginateRaw

func PaginateRaw[T any](ctx context.Context, client RawRequester, request RawRequest, decode RawPageDecoder[T], options ...RawPaginationOptions) (*CursorPage[T], error)

PaginateRaw loads one page using an application decoder. Use NextPage or All on the result to continue lazily. cursorParameter defaults to "cursor".

func (*CursorPage[T]) All

func (p *CursorPage[T]) All(ctx context.Context) iter.Seq2[T, error]

func (*CursorPage[T]) HasMore

func (p *CursorPage[T]) HasMore() bool

func (*CursorPage[T]) NextPage

func (p *CursorPage[T]) NextPage(ctx context.Context) (*CursorPage[T], error)

type Customer

type Customer struct {
	ID                 string  `json:"id"`
	TeamID             string  `json:"teamId"`
	ProjectID          string  `json:"projectId"`
	Name               *string `json:"name"`
	ExternalCustomerID *string `json:"externalCustomerId"`
	Status             string  `json:"status"`
	IsDefault          bool    `json:"isDefault"`
	ArchivedAt         *int64  `json:"archivedAt"`
	CreatedAt          int64   `json:"createdAt"`
	UpdatedAt          int64   `json:"updatedAt"`
}

type CustomerArchivedPayload

type CustomerArchivedPayload = CustomerEventPayload

type CustomerArchivingPayload

type CustomerArchivingPayload struct {
	CustomerEventPayload
	BlockingConnectionCount int `json:"blockingConnectionCount"`
	RevokedPairingLinkCount int `json:"revokedPairingLinkCount"`
}

type CustomerConnection

type CustomerConnection struct {
	ID           string  `json:"id"`
	CustomerID   string  `json:"customerId"`
	ConnectionID string  `json:"connectionId"`
	Name         *string `json:"name"`
	PhoneMasked  *string `json:"phoneMasked"`
	Status       string  `json:"status"`
	Backend      *string `json:"backend"`
	CreatedAt    int64   `json:"createdAt"`
}

type CustomerConnectionAttachedPayload

type CustomerConnectionAttachedPayload struct {
	CustomerEventPayload
	ConnectionID  string `json:"connectionId"`
	PairingLinkID string `json:"pairingLinkId,omitempty"`
}

type CustomerConnectionDisconnectedPayload

type CustomerConnectionDisconnectedPayload struct {
	CustomerEventPayload
	ConnectionID string `json:"connectionId"`
	Reason       string `json:"reason"`
}

type CustomerConnectionTransferredPayload

type CustomerConnectionTransferredPayload struct {
	CustomerEventPayload
	ConnectionID     string `json:"connectionId"`
	SourceCustomerID string `json:"sourceCustomerId"`
}

type CustomerCreatedPayload

type CustomerCreatedPayload = CustomerEventPayload

type CustomerEnabledPayload

type CustomerEnabledPayload struct {
	CustomerEventPayload
	MigratedConnectionCount int `json:"migratedConnectionCount"`
}

type CustomerEvent

type CustomerEvent struct {
	ID            string                `json:"id"`
	Action        string                `json:"action"`
	FromStatus    *string               `json:"fromStatus"`
	ToStatus      *string               `json:"toStatus"`
	ConnectionID  *string               `json:"connectionId"`
	PairingLinkID *string               `json:"pairingLinkId"`
	Metadata      CustomerEventMetadata `json:"metadata"`
	OccurredAt    int64                 `json:"occurredAt"`
}

type CustomerEventMetadata

type CustomerEventMetadata struct {
	Fields []string `json:"fields,omitempty"`
}

type CustomerEventPayload

type CustomerEventPayload struct {
	EventID    string `json:"eventId"`
	OccurredAt string `json:"occurredAt"`
	TeamID     string `json:"teamId"`
	ProjectID  string `json:"projectId"`
	CustomerID string `json:"customerId"`
	ActorKind  string `json:"actorKind"`
	// contains filtered or unexported fields
}
type CustomerPairingLink struct {
	ID                  string   `json:"id"`
	TeamID              string   `json:"teamId"`
	ProjectID           string   `json:"projectId"`
	CustomerID          string   `json:"customerId"`
	ExpectedPhoneMasked *string  `json:"expectedPhoneMasked"`
	Methods             []string `json:"methods"`
	Locale              *string  `json:"locale"`
	Theme               *string  `json:"theme"`
	ExpiresAt           int64    `json:"expiresAt"`
	Status              string   `json:"status"`
	AttemptCount        int      `json:"attemptCount"`
	MaxAttempts         int      `json:"maxAttempts"`
	PendingConnectionID *string  `json:"pendingConnectionId"`
	CreatedBy           *string  `json:"createdBy"`
	ReservedAt          *int64   `json:"reservedAt"`
	OpenedAt            *int64   `json:"openedAt"`
	ConnectingAt        *int64   `json:"connectingAt"`
	ConnectedAt         *int64   `json:"connectedAt"`
	FailedAt            *int64   `json:"failedAt"`
	ExpiredAt           *int64   `json:"expiredAt"`
	RevokedAt           *int64   `json:"revokedAt"`
	LastErrorCode       *string  `json:"lastErrorCode"`
	FailedExchangeCount int      `json:"failedExchangeCount"`
	PhoneMismatchCount  int      `json:"phoneMismatchCount"`
	CreatedAt           int64    `json:"createdAt"`
	UpdatedAt           int64    `json:"updatedAt"`
}

type CustomerPairingLinkConnectedPayload

type CustomerPairingLinkConnectedPayload struct {
	CustomerPairingLinkPayload
	ConnectionID string `json:"connectionId"`
}

type CustomerPairingLinkCreatedPayload

type CustomerPairingLinkCreatedPayload = CustomerPairingLinkPayload

type CustomerPairingLinkExpiredPayload

type CustomerPairingLinkExpiredPayload = CustomerPairingLinkPayload

type CustomerPairingLinkFailedPayload

type CustomerPairingLinkFailedPayload struct {
	CustomerPairingLinkPayload
	ErrorCode string `json:"errorCode"`
}

type CustomerPairingLinkOpenedPayload

type CustomerPairingLinkOpenedPayload = CustomerPairingLinkPayload

type CustomerPairingLinkPayload

type CustomerPairingLinkPayload struct {
	CustomerEventPayload
	PairingLinkID string `json:"pairingLinkId"`
}

type CustomerPairingLinkRevokedPayload

type CustomerPairingLinkRevokedPayload struct {
	CustomerPairingLinkPayload
	Reason string `json:"reason,omitempty"`
}

type CustomerProjectRequest

type CustomerProjectRequest struct {
	ProjectID string `json:"projectId,omitempty"`
}

type CustomerRestoredPayload

type CustomerRestoredPayload = CustomerEventPayload

type CustomerServiceWindow

type CustomerServiceWindow struct {
	State     string  `json:"state"`
	Reason    *string `json:"reason"`
	OpenedAt  *string `json:"openedAt"`
	ExpiresAt *string `json:"expiresAt"`
	CheckedAt string  `json:"checkedAt"`
}

CustomerServiceWindow is observed state; unknown never authorizes a send.

type CustomerSignalCustodyUpdate

type CustomerSignalCustodyUpdate struct {
	ExpectedRevision  int64                       `json:"expectedRevision"`
	SignalModeDefault Nullable[SignalCustodyMode] `json:"signalModeDefault"`
}

A zero Nullable SignalModeDefault restores Customer inheritance.

type CustomerSummary

type CustomerSummary struct {
	Customer
	ConnectionCount          int     `json:"connectionCount"`
	ConnectedConnectionCount int     `json:"connectedConnectionCount"`
	ActivePairingLinkState   *string `json:"activePairingLinkState"`
	LastActivityAt           *int64  `json:"lastActivityAt"`
	NeedsAttention           bool    `json:"needsAttention"`
}

type CustomerUpdatedPayload

type CustomerUpdatedPayload struct {
	CustomerEventPayload
	Fields []string `json:"fields"`
}

type Customers

type Customers struct {
	// contains filtered or unexported fields
}

func (*Customers) Archive

func (*Customers) Create

func (*Customers) Enable

func (*Customers) GetSignalCustody

func (r *Customers) GetSignalCustody(ctx context.Context, project, customer string, o ...RequestOptions) (Response[Envelope[SignalCustodyDefault]], error)

func (*Customers) ListConnections

func (r *Customers) ListConnections(ctx context.Context, id, project string, o ...RequestOptions) (Response[Envelope[[]CustomerConnection]], error)

func (*Customers) ListEvents

func (r *Customers) ListPairingLinks(ctx context.Context, id, project string, o ...RequestOptions) (Response[Envelope[[]CustomerPairingLink]], error)

func (*Customers) Restore

func (*Customers) Retrieve

func (r *Customers) Retrieve(ctx context.Context, id, project string, o ...RequestOptions) (Response[Envelope[Customer]], error)
func (r *Customers) RevokePairingLink(ctx context.Context, id, link, project string, o ...RequestOptions) (Response[Envelope[CustomerPairingLink]], error)

func (*Customers) Status

func (*Customers) TransferConnection

func (*Customers) Update

func (*Customers) UpdateSignalCustody

func (r *Customers) UpdateSignalCustody(ctx context.Context, project, customer string, b CustomerSignalCustodyUpdate, o ...RequestOptions) (Response[Envelope[SignalCustodyDefault]], error)

type CustomersEnablement

type CustomersEnablement struct {
	CustomersStatus
	MigratedConnectionCount int `json:"migratedConnectionCount"`
}

type CustomersStatus

type CustomersStatus struct {
	Enabled         bool      `json:"enabled"`
	EnabledAt       *int64    `json:"enabledAt"`
	EnabledBy       *string   `json:"enabledBy"`
	DefaultCustomer *Customer `json:"defaultCustomer"`
}

type DecodeHistorySyncOptions

type DecodeHistorySyncOptions struct {
	MaxInflatedBytes int64
	// Decoder receives a private copy of verified, inflated protobuf. It may use
	// the full pinned proto2 schema; the lossless Protobuf field is always retained.
	Decoder func(context.Context, []byte) (any, error)
}

type DeleteAudienceMemberResult

type DeleteAudienceMemberResult struct {
	Removed        bool   `json:"removed"`
	ListID         string `json:"listId"`
	Phone          string `json:"phone"`
	RecipientCount int    `json:"recipientCount"`
}

type DeleteAudienceProfileResult

type DeleteAudienceProfileResult struct {
	Deleted  bool   `json:"deleted"`
	Phone    string `json:"phone"`
	Revision int64  `json:"revision"`
}

type DeletedQuickReply

type DeletedQuickReply struct {
	ID     string `json:"id"`
	Status string `json:"status"`
}

type DirectHistorySyncCommon

type DirectHistorySyncCommon struct {
	Delivery                 string              `json:"delivery"`
	WhatsAppIDs              WhatsAppMessageIDs  `json:"whatsapp_ids"`
	OriginalWhatsAppIDs      *WhatsAppMessageIDs `json:"original_whatsapp_ids,omitempty"`
	WhatsAppID               string              `json:"whatsapp_id,omitempty"`
	OriginalWhatsAppID       string              `json:"original_whatsapp_id,omitempty"`
	SyncType                 string              `json:"syncType"`
	ChunkOrder               *uint64             `json:"chunkOrder,omitempty"`
	Progress                 *int                `json:"progress,omitempty"`
	FileLength               uint64              `json:"fileLength"`
	OldestMessageAt          *string             `json:"oldestMessageAt,omitempty"`
	PeerDataRequestSessionID *string             `json:"peerDataRequestSessionId,omitempty"`
	// contains filtered or unexported fields
}

DirectHistorySyncCommon carries projected public IDs. Retry identity is the linked_devices ID, never the event UUID. Length checks belong to downloaders.

type DirectHistorySyncInline

type DirectHistorySyncInline struct {
	Encoding string `json:"encoding"`
	Data     string `json:"data"`
}

func (DirectHistorySyncInline) GoString

func (v DirectHistorySyncInline) GoString() string

func (DirectHistorySyncInline) MarshalJSON

func (DirectHistorySyncInline) MarshalJSON() ([]byte, error)

func (DirectHistorySyncInline) String

type DirectHistorySyncInlinePayload

type DirectHistorySyncInlinePayload struct {
	DirectHistorySyncCommon
	Inline DirectHistorySyncInline `json:"inline"`
}

func (DirectHistorySyncInlinePayload) GoString

func (DirectHistorySyncInlinePayload) MarshalJSON

func (DirectHistorySyncInlinePayload) MarshalJSON() ([]byte, error)

func (DirectHistorySyncInlinePayload) String

type DirectHistorySyncMedia

type DirectHistorySyncMedia struct {
	Type          string  `json:"type"`
	DirectPath    string  `json:"directPath"`
	MediaKey      string  `json:"mediaKey"`
	FileSHA256    string  `json:"fileSha256"`
	FileEncSHA256 string  `json:"fileEncSha256"`
	EncHandle     *string `json:"encHandle,omitempty"`
}

func (DirectHistorySyncMedia) GoString

func (v DirectHistorySyncMedia) GoString() string

func (DirectHistorySyncMedia) MarshalJSON

func (DirectHistorySyncMedia) MarshalJSON() ([]byte, error)

Descriptor-bearing diagnostic serialization follows the media descriptor policy. The original signed webhook bytes remain on WebhookEvent.Payload.

func (DirectHistorySyncMedia) String

func (DirectHistorySyncMedia) String() string

type DirectHistorySyncMediaPayload

type DirectHistorySyncMediaPayload struct {
	DirectHistorySyncCommon
	Media DirectHistorySyncMedia `json:"media"`
}

func (DirectHistorySyncMediaPayload) GoString

func (DirectHistorySyncMediaPayload) MarshalJSON

func (DirectHistorySyncMediaPayload) MarshalJSON() ([]byte, error)

func (DirectHistorySyncMediaPayload) String

type DisappearingTimerRequest

type DisappearingTimerRequest struct {
	DurationSeconds int `json:"durationSeconds"`
}

type DownloadHistoryChunkOptions

type DownloadHistoryChunkOptions struct {
	DecodeHistorySyncOptions
	MaxBytes   int64
	HTTPClient *http.Client
}

type EditCloudTemplateRequest

type EditCloudTemplateRequest struct {
	Components []json.RawMessage `json:"components"`
}

type EditCloudTemplateResult

type EditCloudTemplateResult struct {
	Accepted bool   `json:"accepted"`
	Name     string `json:"name"`
	Language string `json:"language"`
}

type EditMessageRequest

type EditMessageRequest struct {
	Transport MessageTransport `json:"transport,omitempty"`
	Text      string           `json:"text"`
}

type EffectiveConnectionConfiguration

type EffectiveConnectionConfiguration struct {
	Observation *ObservationConfiguration `json:"observation,omitempty"`
	HistorySync *HistorySyncPolicy        `json:"historySync,omitempty"`
	HMS         *HMSConfiguration         `json:"hms,omitempty"`
}

type EmbeddedSignupRequest

type EmbeddedSignupRequest struct {
	QuickLinkID string                `json:"quicklinkId"`
	ProjectID   string                `json:"projectId,omitempty"`
	Result      *EmbeddedSignupResult `json:"result,omitempty"`
}

type EmbeddedSignupResult

type EmbeddedSignupResult struct {
	Code          string `json:"code"`
	WABAID        string `json:"wabaId"`
	PhoneNumberID string `json:"phoneNumberId"`
	Coexistence   *bool  `json:"coexistence,omitempty"`
	HistorySync   *bool  `json:"historySync,omitempty"`
}

type EncodedEventPayload

type EncodedEventPayload struct {
	Encoding    string `json:"encoding"`
	ContentType string `json:"contentType"`
	Data        string `json:"data"`
}

type EncryptMediaOptions

type EncryptMediaOptions struct {
	MediaType UploadMediaType
	MimeType  string
	// MediaKey is optional. Supply a fixed key only for a repeat pass of the same immutable source or a test vector.
	MediaKey []byte
	MaxBytes int64
}

type EncryptedMedia

type EncryptedMedia struct {
	EncryptedMediaInfo
	Ciphertext []byte `json:"-"`
}

func EncryptWhatsAppMedia

func EncryptWhatsAppMedia(ctx context.Context, plaintext []byte, options EncryptMediaOptions) (EncryptedMedia, error)

func (EncryptedMedia) GoString

func (media EncryptedMedia) GoString() string

func (EncryptedMedia) String

func (media EncryptedMedia) String() string

type EncryptedMediaInfo

type EncryptedMediaInfo struct {
	MediaType       UploadMediaType `json:"mediaType"`
	MediaKey        []byte          `json:"-"`
	FileSHA256      []byte          `json:"fileSha256"`
	FileEncSHA256   []byte          `json:"fileEncSha256"`
	FileLength      int64           `json:"fileLength"`
	EncryptedLength int64           `json:"encryptedLength"`
	MimeType        string          `json:"mimeType,omitempty"`
}

func EncryptWhatsAppMediaTo

func EncryptWhatsAppMediaTo(ctx context.Context, source io.Reader, destination io.Writer, options EncryptMediaOptions, expected *EncryptedMediaInfo) (EncryptedMediaInfo, error)

EncryptWhatsAppMediaTo encrypts incrementally with bounded working memory. expected is used for a repeat pass. The source must reach EOF and match its hashes and length before the final ciphertext block and MAC are released. Cellar whatsapp-1049950004 WAMediaCrypto.js:75-101 defines ciphertext || mac10.

func (EncryptedMediaInfo) GoString

func (info EncryptedMediaInfo) GoString() string

func (EncryptedMediaInfo) String

func (info EncryptedMediaInfo) String() string

type EnrollCampaignContactRequest

type EnrollCampaignContactRequest struct {
	Phone     string                      `json:"phone"`
	Variables map[string]CampaignVariable `json:"variables,omitempty"`
}

EnrollCampaignContactRequest enrolls one phone in a continuous drip. A phone already in the drip returns created=false and is never restarted.

type EnrollPlatformCampaignContactRequest

type EnrollPlatformCampaignContactRequest struct {
	ProjectID string `json:"projectId"`
	EnrollCampaignContactRequest
}

EnrollPlatformCampaignContactRequest selects the owning project explicitly.

type Envelope

type Envelope[T any] struct {
	Success bool `json:"success"`
	Data    T    `json:"data"`
}

type Error

type Error struct {
	Kind            ErrorKind
	Code            string
	Message         string
	Field           string
	Status          int
	RequestID       string
	RequestLogURL   string
	DocURL          string
	RateLimitReason string
	Details         json.RawMessage
	Metadata        Metadata
	Cause           error
}

Error preserves API error codes, including codes added after this SDK release.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorKind

type ErrorKind string
const (
	ConfigurationError   ErrorKind = "configuration"
	ValidationError      ErrorKind = "validation"
	AuthenticationError  ErrorKind = "authentication"
	AuthorizationError   ErrorKind = "authorization"
	PaymentRequiredError ErrorKind = "payment_required"
	NotFoundError        ErrorKind = "not_found"
	ConflictError        ErrorKind = "conflict"
	RateLimitError       ErrorKind = "rate_limit"
	ServerError          ErrorKind = "server"
	ConnectionError      ErrorKind = "connection"
	TimeoutError         ErrorKind = "timeout"
	CancelledError       ErrorKind = "cancelled"
)

type EventReplayReceipt

type EventReplayReceipt struct {
	EventID     string             `json:"eventId"`
	DeliveryID  string             `json:"deliveryId"`
	OperationID string             `json:"operationId"`
	Idempotency IdempotencyReceipt `json:"idempotency"`
}

type EventStream

type EventStream struct {
	// contains filtered or unexported fields
}

func (*EventStream) Cursor

func (s *EventStream) Cursor() string

func (*EventStream) Items

Items reads one stream, reconnecting with the last delivered cursor. Cancel context to close the connection. Only one iterator should consume a stream.

type EventStreamAcknowledgement

type EventStreamAcknowledgement struct {
	Cursor   string `json:"cursor"`
	Sequence int64  `json:"sequence"`
}

type EventStreamAcknowledgementReceipt

type EventStreamAcknowledgementReceipt struct {
	StreamID           string `json:"streamId"`
	AcknowledgedCursor string `json:"acknowledgedCursor"`
	Sequence           int64  `json:"sequence"`
	Replayed           bool   `json:"replayed"`
}

type EventStreamGap

type EventStreamGap struct {
	Reason          string  `json:"reason"`
	MissedEvents    int64   `json:"missedEvents"`
	RequestedCursor *string `json:"requestedCursor"`
}

type EventStreamItem

type EventStreamItem struct {
	Event    PlatformEvent
	StreamID string
	Sequence int64
	Webhook  *WebhookEvent
	Cursor   string
}

type EventStreamParams

type EventStreamParams struct {
	ProjectID    string
	Types        []string
	Since        string
	Ack          string
	InitialDelay time.Duration
	MaxDelay     time.Duration
	Timeout      time.Duration
	OnGap        func(EventStreamGap)
	OnReconnect  func(error, time.Duration)
}

type EventStreamSource

type EventStreamSource struct {
	// contains filtered or unexported fields
}

EventStreamSource adapts retained webhook bodies to an application-owned live event consumer.

func NewEventStreamSource

func NewEventStreamSource(open func(EventStreamParams) (*EventStream, error), p EventStreamParams) (*EventStreamSource, error)

func (*EventStreamSource) Subscribe

Subscribe starts one cancellable reader. Cancel returns immediately; Done closes after the body and watchdog are released.

type Events

type Events struct {
	// contains filtered or unexported fields
}

func (*Events) List

func (*Events) ListIndexed

func (*Events) LiveSource

func (r *Events) LiveSource(p EventStreamParams) (*EventStreamSource, error)

func (*Events) Replay

func (*Events) Retrieve

func (r *Events) Retrieve(ctx context.Context, id string, includePayload *bool, o ...RequestOptions) (Response[PlatformEvent], error)

func (*Events) Stream

func (r *Events) Stream(p EventStreamParams) (*EventStream, error)

type ExportCallRecordsParams

type ExportCallRecordsParams struct {
	CallFilters
	ListParams
	Format string
}
type FlowConnectionLink struct {
	Connection       string                `json:"connection"`
	ConnectionID     string                `json:"connectionId,omitempty"`
	WABAID           string                `json:"wabaId"`
	MetaFlowID       string                `json:"metaFlowId"`
	Status           string                `json:"status"`
	Categories       []string              `json:"categories"`
	ValidationErrors []FlowValidationIssue `json:"validationErrors"`
	UploadState      string                `json:"uploadState"`
	PreviewURL       string                `json:"previewUrl,omitempty"`
	PreviewExpiresAt *int64                `json:"previewExpiresAt,omitempty"`
	LastSyncedAt     int64                 `json:"lastSyncedAt"`
	DefinitionDigest string                `json:"definitionDigest,omitempty"`
	Simulated        *bool                 `json:"simulated,omitempty"`
}

type FlowConnectionRequest

type FlowConnectionRequest struct {
	ConnectionID string `json:"connectionId"`
}

type FlowContent

type FlowContent struct {
	Body       string `json:"body"`
	ButtonText string `json:"buttonText"`
	Footer     string `json:"footer,omitempty"`
	ID         string `json:"id"`
	Token      string `json:"token"`
	Action     string `json:"action"`
	Screen     string `json:"screen,omitempty"`
	DataJSON   string `json:"dataJson,omitempty"`
}

type FlowDraft

type FlowDraft struct {
	FlowSummary
	Definition map[string]json.RawMessage `json:"definition"`
}

type FlowEncryption

type FlowEncryption struct {
	// contains filtered or unexported fields
}

func (*FlowEncryption) Retrieve

type FlowEncryptionCustody

type FlowEncryptionCustody struct {
	Custody     string                     `json:"custody"`
	ActiveKeyID *string                    `json:"activeKeyId"`
	Keys        []ManagedFlowEncryptionKey `json:"keys"`
}

type FlowEncryptionKey

type FlowEncryptionKey struct {
	BusinessPublicKey                string `json:"business_public_key"`
	BusinessPublicKeySignatureStatus string `json:"business_public_key_signature_status"`
}

type FlowEncryptionKeyList

type FlowEncryptionKeyList struct {
	Data []FlowEncryptionKey `json:"data"`
}

type FlowEncryptionKeyRotation

type FlowEncryptionKeyRotation struct {
	FlowEncryptionCustody
	Key ManagedFlowEncryptionKey `json:"key"`
}

type FlowEndpoint

type FlowEndpoint struct {
	ID           string  `json:"id"`
	TeamID       string  `json:"teamId"`
	ProjectID    string  `json:"projectId"`
	FlowID       string  `json:"flowId"`
	ConnectionID string  `json:"connectionId"`
	Mode         string  `json:"mode"`
	URL          *string `json:"url"`
	FunctionID   *string `json:"functionId"`
	DeploymentID *string `json:"deploymentId"`
	Enabled      bool    `json:"enabled"`
	Revision     int64   `json:"revision"`
	EndpointURI  string  `json:"endpointUri"`
	CreatedAt    int64   `json:"createdAt"`
	UpdatedAt    int64   `json:"updatedAt"`
}

type FlowEndpointReceipt

type FlowEndpointReceipt struct {
	ID                   string   `json:"id"`
	FlowID               string   `json:"flowId"`
	EndpointID           string   `json:"endpointId"`
	ConnectionID         string   `json:"connectionId"`
	Mode                 string   `json:"mode"`
	Action               *string  `json:"action"`
	Outcome              string   `json:"outcome"`
	HTTPStatus           *int     `json:"httpStatus"`
	ErrorCode            *string  `json:"errorCode"`
	KeyID                *string  `json:"keyId"`
	FunctionInvocationID *string  `json:"functionInvocationId"`
	DurationMS           *float64 `json:"durationMs"`
	CreatedAt            int64    `json:"createdAt"`
	CompletedAt          *int64   `json:"completedAt"`
}

type FlowEndpointSetResult

type FlowEndpointSetResult struct {
	Endpoint      FlowEndpoint          `json:"endpoint"`
	SigningSecret string                `json:"signingSecret,omitempty"`
	Encryption    FlowEncryptionCustody `json:"encryption"`
}

func (FlowEndpointSetResult) GoString

func (v FlowEndpointSetResult) GoString() string

func (FlowEndpointSetResult) String

func (FlowEndpointSetResult) String() string

type FlowEndpointState

type FlowEndpointState struct {
	Endpoint   *FlowEndpoint         `json:"endpoint"`
	Encryption FlowEncryptionCustody `json:"encryption"`
}

type FlowOK

type FlowOK struct {
	OK bool `json:"ok"`
}

type FlowProviderOperation

type FlowProviderOperation struct {
	ID               string  `json:"id"`
	RequestID        *string `json:"requestId"`
	FlowID           string  `json:"flowId"`
	FlowName         string  `json:"flowName"`
	ConnectionID     string  `json:"connectionId"`
	Connection       string  `json:"connection"`
	Action           string  `json:"action"`
	State            string  `json:"state"`
	Resolution       *string `json:"resolution"`
	WABAID           *string `json:"wabaId"`
	MetaFlowID       *string `json:"metaFlowId"`
	DefinitionDigest *string `json:"definitionDigest"`
	ProviderStatus   *string `json:"providerStatus"`
	ErrorCode        *string `json:"errorCode"`
	ProviderCode     *int    `json:"providerCode"`
	ProviderSubcode  *int    `json:"providerSubcode"`
	CreatedAt        int64   `json:"createdAt"`
	UpdatedAt        int64   `json:"updatedAt"`
	CompletedAt      *int64  `json:"completedAt"`
}

type FlowProviderRequest

type FlowProviderRequest struct {
	ConnectionID string   `json:"connectionId"`
	Categories   []string `json:"categories,omitempty"`
	RequestID    string   `json:"requestId,omitempty"`
}

type FlowProviderResult

type FlowProviderResult struct {
	Operation *FlowProviderOperation `json:"operation"`
	Flow      FlowDraft              `json:"flow"`
}

type FlowSummary

type FlowSummary struct {
	ID          string               `json:"id"`
	Name        string               `json:"name"`
	Status      string               `json:"status"`
	Version     string               `json:"version"`
	ScreenCount int                  `json:"screenCount"`
	MetaLinks   []FlowConnectionLink `json:"metaLinks"`
	CreatedAt   int64                `json:"createdAt"`
	UpdatedAt   int64                `json:"updatedAt"`
}

type FlowValidationIssue

type FlowValidationIssue struct {
	LineStart   *int                    `json:"lineStart,omitempty"`
	LineEnd     *int                    `json:"lineEnd,omitempty"`
	ColumnStart *int                    `json:"columnStart,omitempty"`
	ColumnEnd   *int                    `json:"columnEnd,omitempty"`
	Error       string                  `json:"error,omitempty"`
	ErrorType   string                  `json:"errorType,omitempty"`
	Message     string                  `json:"message,omitempty"`
	Pointers    []FlowValidationPointer `json:"pointers,omitempty"`
}

type FlowValidationPointer

type FlowValidationPointer struct {
	Path        string `json:"path,omitempty"`
	LineStart   *int   `json:"lineStart,omitempty"`
	LineEnd     *int   `json:"lineEnd,omitempty"`
	ColumnStart *int   `json:"columnStart,omitempty"`
	ColumnEnd   *int   `json:"columnEnd,omitempty"`
}

type Flows

type Flows struct {
	// contains filtered or unexported fields
}

func (*Flows) Create

func (*Flows) Delete

func (r *Flows) Delete(ctx context.Context, id string, o ...RequestOptions) (Response[FlowOK], error)

func (*Flows) DeleteEndpoint

func (r *Flows) DeleteEndpoint(ctx context.Context, id string, p FlowConnectionRequest, o ...RequestOptions) (Response[FlowOK], error)

func (*Flows) Deprecate

func (*Flows) Discard

func (*Flows) Endpoint

func (*Flows) List

func (r *Flows) List(ctx context.Context, o ...RequestOptions) (Response[[]FlowSummary], error)

func (*Flows) Publish

func (*Flows) Receipts

func (r *Flows) Receipts(ctx context.Context, id string, o ...RequestOptions) (Response[[]FlowProviderOperation], error)

func (*Flows) Retrieve

func (r *Flows) Retrieve(ctx context.Context, id string, o ...RequestOptions) (Response[*FlowDraft], error)

func (*Flows) Update

func (*Flows) Upload

type FollowRequestLogsParams

type FollowRequestLogsParams struct {
	ProjectID string
	After     string
	Limit     *int
}

type FunctionDefinition

type FunctionDefinition struct {
	ID                 string  `json:"id"`
	ProjectID          string  `json:"projectId"`
	Name               string  `json:"name"`
	Enabled            bool    `json:"enabled"`
	Revision           int64   `json:"revision"`
	ActiveDeploymentID *string `json:"activeDeploymentId"`
	CreatedAt          string  `json:"createdAt"`
	UpdatedAt          string  `json:"updatedAt"`
}

type FunctionDeployment

type FunctionDeployment struct {
	FunctionDeploymentSummary
	Source string `json:"source"`
}

type FunctionDeploymentSummary

type FunctionDeploymentSummary struct {
	ID                string   `json:"id"`
	FunctionID        string   `json:"functionId"`
	Language          string   `json:"language"`
	Region            string   `json:"region"`
	CompatibilityDate string   `json:"compatibilityDate"`
	SHA256            string   `json:"sha256"`
	SecretVersionIDs  []string `json:"secretVersionIds"`
	EgressOrigins     []string `json:"egressOrigins"`
	CreatedAt         string   `json:"createdAt"`
}

type FunctionDeployments

type FunctionDeployments struct {
	// contains filtered or unexported fields
}

func (*FunctionDeployments) Retrieve

func (r *FunctionDeployments) Retrieve(ctx context.Context, id, deploymentID string, o ...RequestOptions) (Response[FunctionDeployment], error)

type FunctionInvocation

type FunctionInvocation struct {
	ID            string  `json:"id"`
	FunctionID    string  `json:"functionId"`
	DeploymentID  string  `json:"deploymentId"`
	Outcome       string  `json:"outcome"`
	Trigger       string  `json:"trigger"`
	ErrorCode     *string `json:"errorCode"`
	DurationMs    *int64  `json:"durationMs"`
	ResponseBytes *int64  `json:"responseBytes"`
	Attempt       int     `json:"attempt"`
	CreatedAt     string  `json:"createdAt"`
	CompletedAt   *string `json:"completedAt"`
}

type FunctionInvocationResult

type FunctionInvocationResult struct {
	Receipt          FunctionInvocation `json:"receipt"`
	Replayed         bool               `json:"replayed"`
	Response         *FunctionResponse  `json:"response,omitempty"`
	ResponseRetained bool               `json:"responseRetained"`
	Retryable        bool               `json:"retryable"`
}

type FunctionInvocations

type FunctionInvocations struct {
	// contains filtered or unexported fields
}

func (*FunctionInvocations) Retrieve

func (r *FunctionInvocations) Retrieve(ctx context.Context, id, invocationID string, o ...RequestOptions) (Response[FunctionInvocation], error)

type FunctionMutationResult

type FunctionMutationResult struct {
	OK bool `json:"ok"`
}

type FunctionPage

type FunctionPage[T any] struct {
	Items      []T     `json:"items"`
	NextCursor *string `json:"nextCursor"`
}

type FunctionRequest

type FunctionRequest struct {
	Method     string            `json:"method"`
	URL        string            `json:"url"`
	Headers    map[string]string `json:"headers"`
	BodyBase64 string            `json:"bodyBase64"`
}

type FunctionResponse

type FunctionResponse struct {
	Status     int               `json:"status"`
	Headers    map[string]string `json:"headers"`
	BodyBase64 string            `json:"bodyBase64"`
}

type FunctionSecretVersion

type FunctionSecretVersion struct {
	ID        string  `json:"id"`
	Name      string  `json:"name"`
	CreatedAt string  `json:"createdAt"`
	RevokedAt *string `json:"revokedAt"`
}

type FunctionSecrets

type FunctionSecrets struct {
	// contains filtered or unexported fields
}

func (*FunctionSecrets) Revoke

func (r *FunctionSecrets) Revoke(ctx context.Context, id, versionID string, o ...RequestOptions) (Response[FunctionMutationResult], error)

type Functions

type Functions struct {
	// contains filtered or unexported fields
}

func (*Functions) Delete

func (r *Functions) Delete(ctx context.Context, id string, expectedRevision int64, o ...RequestOptions) (Response[FunctionMutationResult], error)

func (*Functions) Deployments

func (r *Functions) Deployments() *FunctionDeployments

func (*Functions) Invocations

func (r *Functions) Invocations() *FunctionInvocations

func (*Functions) Retrieve

func (*Functions) Secrets

func (r *Functions) Secrets() *FunctionSecrets

func (*Functions) Update

type Group

type Group struct {
	ID           string             `json:"id"`
	Name         string             `json:"name"`
	Description  string             `json:"description"`
	CreatedAt    int64              `json:"createdAt"`
	Participants []GroupParticipant `json:"participants"`
	OwnerID      string             `json:"ownerId"`
}

type GroupCapabilities

type GroupCapabilities struct {
	Status       string  `json:"status"`
	SyncedAt     *string `json:"syncedAt"`
	CheckedAt    *string `json:"checkedAt"`
	Capabilities []struct {
		Key    string  `json:"key"`
		Kind   string  `json:"kind"`
		Unit   *string `json:"unit"`
		Value  *bool   `json:"value"`
		Source *string `json:"source"`
	} `json:"capabilities"`
}

type GroupInviteCode

type GroupInviteCode struct {
	Code string `json:"code"`
}

type GroupInviteInfo

type GroupInviteInfo struct {
	ID           string             `json:"id"`
	Subject      string             `json:"subject"`
	CreatedAt    int64              `json:"createdAt"`
	Size         int                `json:"size"`
	Participants []GroupParticipant `json:"participants"`
	CreatorID    string             `json:"creatorId"`
}

type GroupParticipant

type GroupParticipant struct {
	ConversationReference
	IsAdmin      bool `json:"isAdmin"`
	IsSuperAdmin bool `json:"isSuperAdmin"`
}

type GroupParticipantPayload

type GroupParticipantPayload struct {
	ID                 string                          `json:"id"`
	Joined             []WebhookIdentity               `json:"joined,omitempty"`
	Left               []WebhookIdentity               `json:"left,omitempty"`
	Promoted           []WebhookIdentity               `json:"promoted,omitempty"`
	Demoted            []WebhookIdentity               `json:"demoted,omitempty"`
	Reason             string                          `json:"reason,omitempty"`
	InitiatedBy        string                          `json:"initiatedBy,omitempty"`
	RequestID          string                          `json:"requestId,omitempty"`
	FailedParticipants []WebhookFailedGroupParticipant `json:"failedParticipants,omitempty"`
	Errors             []OfficialGroupWebhookError     `json:"errors,omitempty"`
	JoinRequest        *WebhookGroupJoinRequest        `json:"joinRequest,omitempty"`
	// contains filtered or unexported fields
}

type GroupParticipantsRequest

type GroupParticipantsRequest struct {
	Participants []string `json:"participants"`
}

type GroupUpdatePayload

type GroupUpdatePayload struct {
	ID                   string                      `json:"id"`
	NewSubject           string                      `json:"newSubject,omitempty"`
	NewDescription       string                      `json:"newDescription,omitempty"`
	Action               string                      `json:"action,omitempty"`
	RequestID            string                      `json:"requestId,omitempty"`
	InviteLink           string                      `json:"inviteLink,omitempty"`
	JoinApprovalRequired *bool                       `json:"joinApprovalRequired,omitempty"`
	PictureChanged       *bool                       `json:"pictureChanged,omitempty"`
	FailedChanges        []string                    `json:"failedChanges,omitempty"`
	Errors               []OfficialGroupWebhookError `json:"errors,omitempty"`
	// contains filtered or unexported fields
}

type Groups

type Groups struct {
	// contains filtered or unexported fields
}

func (*Groups) AddParticipants

func (r *Groups) AddParticipants(ctx context.Context, s, id string, b GroupParticipantsRequest, o ...RequestOptions) (Response[Success], error)

func (*Groups) Create

func (*Groups) Delete

func (r *Groups) Delete(ctx context.Context, s, id string, o ...RequestOptions) (Response[Success], error)

func (*Groups) DemoteParticipants

func (r *Groups) DemoteParticipants(ctx context.Context, s, id string, b GroupParticipantsRequest, o ...RequestOptions) (Response[Success], error)

func (*Groups) GetCapabilities

func (r *Groups) GetCapabilities(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[GroupCapabilities]], error)

func (*Groups) GetInviteCode

func (r *Groups) GetInviteCode(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[GroupInviteCode]], error)

func (*Groups) GetJoinInfo

func (r *Groups) GetJoinInfo(ctx context.Context, s, code string, o ...RequestOptions) (Response[Envelope[GroupInviteInfo]], error)

func (*Groups) Join

func (r *Groups) Join(ctx context.Context, s, code string, o ...RequestOptions) (Response[Success], error)

func (*Groups) Leave

func (r *Groups) Leave(ctx context.Context, s, id string, o ...RequestOptions) (Response[Success], error)

func (*Groups) List

func (r *Groups) List(ctx context.Context, s string, o ...RequestOptions) (Response[Envelope[[]Group]], error)

func (*Groups) ListParticipants

func (r *Groups) ListParticipants(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[[]GroupParticipant]], error)

func (*Groups) PromoteParticipants

func (r *Groups) PromoteParticipants(ctx context.Context, s, id string, b GroupParticipantsRequest, o ...RequestOptions) (Response[Success], error)

func (*Groups) RemoveParticipants

func (r *Groups) RemoveParticipants(ctx context.Context, s, id string, b GroupParticipantsRequest, o ...RequestOptions) (Response[Success], error)

func (*Groups) Retrieve

func (r *Groups) Retrieve(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[Group]], error)

func (*Groups) RevokeInviteCode

func (r *Groups) RevokeInviteCode(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[GroupInviteCode]], error)

func (*Groups) SetDescription

func (r *Groups) SetDescription(ctx context.Context, s, id, value string, o ...RequestOptions) (Response[Success], error)

func (*Groups) SetInfoEditing

func (r *Groups) SetInfoEditing(ctx context.Context, s, id string, adminsOnly bool, o ...RequestOptions) (Response[Success], error)

func (*Groups) SetJoinApproval

func (r *Groups) SetJoinApproval(ctx context.Context, s, id string, required bool, o ...RequestOptions) (Response[Success], error)

func (*Groups) SetMemberAddMode

func (r *Groups) SetMemberAddMode(ctx context.Context, s, id, mode string, o ...RequestOptions) (Response[Success], error)

func (*Groups) SetMessaging

func (r *Groups) SetMessaging(ctx context.Context, s, id string, adminsOnly bool, o ...RequestOptions) (Response[Success], error)

func (*Groups) SetPicture

func (r *Groups) SetPicture(ctx context.Context, s, id string, b PictureRequest, o ...RequestOptions) (Response[Success], error)

func (*Groups) SetSubject

func (r *Groups) SetSubject(ctx context.Context, s, id, value string, o ...RequestOptions) (Response[Success], error)

type HMSConfiguration

type HMSConfiguration struct {
	Enabled       bool   `json:"enabled"`
	Region        string `json:"region,omitempty"`
	Policy        string `json:"policy,omitempty"`
	RetentionDays *int   `json:"retentionDays,omitempty"`
	PolicyVersion string `json:"policyVersion,omitempty"`
	LegalHold     *bool  `json:"legalHold,omitempty"`
}

type HandRaisedRequest

type HandRaisedRequest struct {
	ConnectionID string `json:"connectionId"`
	Participant  string `json:"participant,omitempty"`
	Raised       bool   `json:"raised"`
}

type HealthCheck

type HealthCheck struct {
	Status string `json:"status"`
	Error  string `json:"error,omitempty"`
}

type HealthResponse

type HealthResponse struct {
	Status string                 `json:"status"`
	Checks map[string]HealthCheck `json:"checks"`
}

type HistoryChat

type HistoryChat struct {
	Conversation   ConversationReference `json:"conversation"`
	Kind           string                `json:"kind"`
	LastActivityAt string                `json:"lastActivityAt"`
	LastMessage    HistoryMessageSummary `json:"lastMessage"`
}

type HistoryConversation

type HistoryConversation struct {
	ID       string
	Protobuf []byte
	Fields   []HistoryProtobufField
	Messages []HistorySyncMessage
}

func (HistoryConversation) GoString

func (v HistoryConversation) GoString() string

func (HistoryConversation) MarshalJSON

func (HistoryConversation) MarshalJSON() ([]byte, error)

func (HistoryConversation) String

func (HistoryConversation) String() string

type HistoryMedia

type HistoryMedia struct {
	ID         string `json:"id"`
	MimeType   string `json:"mimeType"`
	FileLength int64  `json:"fileLength"`
	URL        string `json:"url"`
}

type HistoryMessage

type HistoryMessage struct {
	Order *CloudOrder `json:"order,omitempty"`
	HistoryMessageSummary
	Conversation struct {
		ConversationReference
		Sender *ConversationReference `json:"sender,omitempty"`
	} `json:"conversation"`
	FromMe            bool     `json:"fromMe"`
	PushName          string   `json:"pushName,omitempty"`
	Text              string   `json:"text,omitempty"`
	Caption           string   `json:"caption,omitempty"`
	MimeType          string   `json:"mimeType,omitempty"`
	Filename          string   `json:"filename,omitempty"`
	PTT               *bool    `json:"ptt,omitempty"`
	Latitude          *float64 `json:"latitude,omitempty"`
	Longitude         *float64 `json:"longitude,omitempty"`
	DisplayName       string   `json:"displayName,omitempty"`
	Title             string   `json:"title,omitempty"`
	Reaction          string   `json:"reaction,omitempty"`
	ReactionTo        string   `json:"reactionTo,omitempty"`
	Edited            *bool    `json:"edited,omitempty"`
	Unavailable       *bool    `json:"unavailable,omitempty"`
	UnavailableReason string   `json:"unavailableReason,omitempty"`
	PollOptions       []struct {
		Name string `json:"name"`
		Hash string `json:"hash"`
	} `json:"pollOptions,omitempty"`
	Media          []HistoryMedia `json:"media,omitempty"`
	MediaRetrieval *struct {
		State  string `json:"state"`
		Reason string `json:"reason,omitempty"`
	} `json:"mediaRetrieval,omitempty"`
}

type HistoryMessageSummary

type HistoryMessageSummary struct {
	ID          string             `json:"id"`
	WhatsAppIDs WhatsAppMessageIDs `json:"whatsapp_ids"`
	WhatsAppID  string             `json:"whatsapp_id,omitempty"`
	Direction   string             `json:"direction"`
	Type        string             `json:"type"`
	Timestamp   string             `json:"timestamp"`
}

type HistoryPage

type HistoryPage[T any] struct {
	Success        bool    `json:"success"`
	Data           []T     `json:"data"`
	HasMore        bool    `json:"hasMore"`
	NextCursor     *string `json:"nextCursor"`
	PreviousCursor *string `json:"previousCursor"`
}

type HistoryProtobufField

type HistoryProtobufField struct {
	Number   uint32
	WireType uint8
	Raw      []byte
	Bytes    []byte
	Integer  uint64
}

HistoryProtobufField preserves the original tag, value and complete wire bytes. Length-delimited data is opaque unless the pinned schema identifies a message.

func (HistoryProtobufField) GoString

func (v HistoryProtobufField) GoString() string

func (HistoryProtobufField) MarshalJSON

func (HistoryProtobufField) MarshalJSON() ([]byte, error)

func (HistoryProtobufField) String

func (HistoryProtobufField) String() string

type HistorySyncChunkDeleteRequest

type HistorySyncChunkDeleteRequest struct {
	DirectPath         string `json:"-"`
	FileEncSHA256      []byte `json:"-"`
	EncHandle          string `json:"-"`
	CompanionMetaNonce string `json:"-"`
}

func (HistorySyncChunkDeleteRequest) GoString

func (HistorySyncChunkDeleteRequest) MarshalJSON

func (HistorySyncChunkDeleteRequest) MarshalJSON() ([]byte, error)

func (HistorySyncChunkDeleteRequest) String

type HistorySyncChunkDeleteResult

type HistorySyncChunkDeleteResult struct {
	Status string `json:"status"`
}

type HistorySyncChunkDescriptor

type HistorySyncChunkDescriptor struct {
	DirectPath    string
	MediaKey      []byte
	FileSHA256    []byte
	FileEncSHA256 []byte
	FileLength    *int64
}

func (HistorySyncChunkDescriptor) GoString

func (v HistorySyncChunkDescriptor) GoString() string

func (HistorySyncChunkDescriptor) MarshalJSON

func (HistorySyncChunkDescriptor) MarshalJSON() ([]byte, error)

func (HistorySyncChunkDescriptor) String

type HistorySyncChunkInput

type HistorySyncChunkInput struct {
	Descriptor    *HistorySyncChunkDescriptor
	InlinePayload []byte
}

HistorySyncChunkInput chooses exactly one descriptor or compressed inline blob.

func (HistorySyncChunkInput) GoString

func (v HistorySyncChunkInput) GoString() string

func (HistorySyncChunkInput) MarshalJSON

func (HistorySyncChunkInput) MarshalJSON() ([]byte, error)

func (HistorySyncChunkInput) String

func (HistorySyncChunkInput) String() string

type HistorySyncChunkRetryRequest

type HistorySyncChunkRetryRequest struct {
	SyncType       HistorySyncType `json:"syncType"`
	ChunkOrder     uint32          `json:"chunkOrder"`
	ChunkMessageID string          `json:"chunkMessageId,omitempty"`
	Regenerate     *bool           `json:"regenerate,omitempty"`
}

type HistorySyncChunkRetryResult

type HistorySyncChunkRetryResult struct {
	RequestID string `json:"requestId"`
	Status    string `json:"status"`
}

type HistorySyncData

type HistorySyncData struct {
	Protobuf      []byte
	Fields        []HistoryProtobufField
	SyncType      uint32
	ChunkOrder    *uint32
	Progress      *uint32
	Conversations []HistoryConversation
	Decoded       any
}

func DecodeHistorySyncPayload

func DecodeHistorySyncPayload(ctx context.Context, compressed []byte, options DecodeHistorySyncOptions) (HistorySyncData, error)

DecodeHistorySyncPayload accepts gzip, zlib or raw deflate, as WAGzip.js:37-38 in Cellar whatsapp-1049950004. It never discards protobuf or unknown fields. The handwritten model exposes core history fields; Decoder handles the full schema.

func (HistorySyncData) GoString

func (v HistorySyncData) GoString() string

func (HistorySyncData) MarshalJSON

func (HistorySyncData) MarshalJSON() ([]byte, error)

func (HistorySyncData) String

func (HistorySyncData) String() string

type HistorySyncDelivery

type HistorySyncDelivery string
const (
	HistoryDeliveryArchive    HistorySyncDelivery = "archive"
	HistoryDeliveryDescriptor HistorySyncDelivery = "descriptor"
)

type HistorySyncDeliveryPatch

type HistorySyncDeliveryPatch string

HistorySyncDeliveryPatch permits descriptor writes; archive is read-only.

const HistoryDeliverySetDescriptor HistorySyncDeliveryPatch = "descriptor"

type HistorySyncMessage

type HistorySyncMessage struct {
	Protobuf        []byte
	Fields          []HistoryProtobufField
	MessageProtobuf []byte
	MessageOrderID  *uint64
}

func (HistorySyncMessage) GoString

func (v HistorySyncMessage) GoString() string

func (HistorySyncMessage) MarshalJSON

func (HistorySyncMessage) MarshalJSON() ([]byte, error)

func (HistorySyncMessage) String

func (HistorySyncMessage) String() string

type HistorySyncPolicy

type HistorySyncPolicy struct {
	Delivery    *HistorySyncDelivery `json:"delivery,omitempty"`
	Mode        string               `json:"mode,omitempty"`
	RequestFull *bool                `json:"requestFull,omitempty"`
}

func (*HistorySyncPolicy) UnmarshalJSON

func (v *HistorySyncPolicy) UnmarshalJSON(b []byte) error

type HistorySyncPolicyPatch

type HistorySyncPolicyPatch struct {
	Mode        string                    `json:"mode,omitempty"`
	RequestFull *bool                     `json:"requestFull,omitempty"`
	Delivery    *HistorySyncDeliveryPatch `json:"delivery,omitempty"`
}

type HistorySyncResource

type HistorySyncResource struct {
	// contains filtered or unexported fields
}

func (*HistorySyncResource) DeleteChunk

DeleteChunk is explicit. Call only after durable local processing; it never deletes the application's copy. Timeout/cancellation does not undo deletion.

func (*HistorySyncResource) RequestChunkRetry

RequestChunkRetry explicitly asks the phone for another history.sync event. API authority enforces history consent and connections:manage. No automatic retry.

type HistorySyncType

type HistorySyncType string
const (
	HistoryInitialBootstrap HistorySyncType = "INITIAL_BOOTSTRAP"
	HistoryInitialStatusV3  HistorySyncType = "INITIAL_STATUS_V3"
	HistoryFull             HistorySyncType = "FULL"
	HistoryRecent           HistorySyncType = "RECENT"
	HistoryPushName         HistorySyncType = "PUSH_NAME"
	HistoryNonBlockingData  HistorySyncType = "NON_BLOCKING_DATA"
	HistoryOnDemand         HistorySyncType = "ON_DEMAND"
)

type HybridConnection

type HybridConnection struct {
	Kind    string `json:"kind"`
	Status  string `json:"status"`
	Enabled bool   `json:"enabled"`
}
type HybridLink struct {
	// contains filtered or unexported fields
}

func (*HybridLink) GetPolicy

func (*HybridLink) SetPaused

func (*HybridLink) State

type HybridLinkState

type HybridLinkState struct {
	Revision    string             `json:"revision"`
	Paused      bool               `json:"paused"`
	Connections []HybridConnection `json:"connections"`
}

type HybridMerge

type HybridMerge struct {
	AbsorbConnectionID string `json:"absorbConnectionId"`
}

type HybridMergeCandidate

type HybridMergeCandidate struct {
	Connections      [2]HybridMergeCandidateConnection `json:"connections"`
	Eligible         bool                              `json:"eligible"`
	IneligibleReason string                            `json:"ineligibleReason,omitempty"`
}

type HybridMergeCandidateConnection

type HybridMergeCandidateConnection struct {
	ID            string           `json:"id"`
	Name          string           `json:"name"`
	Method        ConnectionMethod `json:"method"`
	Status        string           `json:"status"`
	CanBeAbsorbed bool             `json:"canBeAbsorbed"`
}

type HybridPaused

type HybridPaused struct {
	Revision string `json:"revision"`
	Paused   bool   `json:"paused"`
}

type HybridResolution

type HybridResolution struct {
	Action                      string `json:"action"`
	Transport                   string `json:"transport,omitempty"`
	ExistingConnectionTransport string `json:"existingConnectionTransport,omitempty"`
	NewConnectionName           string `json:"newConnectionName,omitempty"`
}

type HybridRoutingPolicy

type HybridRoutingPolicy struct {
	Scope             string   `json:"scope"`
	Revision          string   `json:"revision"`
	Prefer            *string  `json:"prefer"`
	AllowedTransports []string `json:"allowedTransports"`
}

type HybridScope

type HybridScope struct {
	Scope      string
	ProjectID  string
	Connection string
}

type IdempotencyReceipt

type IdempotencyReceipt struct {
	ID        string `json:"id"`
	Key       string `json:"key"`
	Replayed  bool   `json:"replayed"`
	CreatedAt string `json:"createdAt"`
	ExpiresAt string `json:"expiresAt"`
}

type Identities

type Identities struct {
	// contains filtered or unexported fields
}

func (*Identities) Resolve

type IdentityParams

type IdentityParams struct {
	PhoneNumber string
	ID          string
	Username    string
	UsernameKey string
}

type ImportCallOptOutsRequest

type ImportCallOptOutsRequest struct {
	Entries []CreateCallOptOutRequest `json:"entries"`
}

type IndexedEventPageMetadata

type IndexedEventPageMetadata struct {
	HasMore       bool    `json:"hasMore"`
	NextOffset    *string `json:"nextOffset"`
	HighWatermark string  `json:"highWatermark"`
}

func (*IndexedEventPageMetadata) UnmarshalJSON

func (p *IndexedEventPageMetadata) UnmarshalJSON(b []byte) error

type IndexedEventRead

type IndexedEventRead struct {
	Items    []PlatformEvent
	Page     IndexedEventPageMetadata
	Metadata Metadata
}

type InteractiveMediaSource

type InteractiveMediaSource struct {
	URL      *string `json:"url,omitempty"`
	Base64   *string `json:"base64,omitempty"`
	MimeType *string `json:"mimeType,omitempty"`
}

InteractiveMediaSource carries exactly one URL or base64 source. Bounds and transport availability remain authoritative at the API.

type InvalidRecipientRow

type InvalidRecipientRow struct {
	Row    int    `json:"row"`
	Reason string `json:"reason"`
}

type IssuePasskeyChallengeRequest

type IssuePasskeyChallengeRequest struct {
	ChallengeB64URL *string `json:"challengeB64Url,omitempty"`
	TTLSeconds      *int64  `json:"ttlSeconds,omitempty"`
	// Deprecated: ignored by the server; runner authority determines this value.
	UserVerification *string `json:"userVerification,omitempty"`
	// Deprecated: ignored by the server; runner authority determines this value.
	TimeoutMS *int64 `json:"timeoutMs,omitempty"`
}

type KnownWebhookPayload

type KnownWebhookPayload interface {
	// contains filtered or unexported methods
}

KnownWebhookPayload is a closed union of the payload families in the pinned TypeScript contract. Use a type switch after TypedPayload; raw bytes remain available on WebhookEvent.Payload for forward-compatible fields and events.

type Label

type Label struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Color      int    `json:"color"`
	OrderIndex *int   `json:"orderIndex,omitempty"`
	ChatCount  *int   `json:"chatCount,omitempty"`
	ObservedAt string `json:"observedAt,omitempty"`
}

type LabelCollection

type LabelCollection struct {
	Policy        string  `json:"policy"`
	Status        string  `json:"status"`
	UnknownReason string  `json:"unknownReason,omitempty"`
	ObservedAt    string  `json:"observedAt,omitempty"`
	ExpiresAt     string  `json:"expiresAt,omitempty"`
	Labels        []Label `json:"labels"`
}

type LabelRead

type LabelRead struct {
	Labels     []Label
	Collection *LabelCollection
}

LabelRead preserves the two documented response shapes. Collection is present when observation metadata was requested; Labels holds the older array shape.

func (LabelRead) MarshalJSON

func (l LabelRead) MarshalJSON() ([]byte, error)

func (*LabelRead) UnmarshalJSON

func (l *LabelRead) UnmarshalJSON(b []byte) error

type Labels

type Labels struct {
	// contains filtered or unexported fields
}

func (*Labels) Create

func (*Labels) Delete

func (r *Labels) Delete(ctx context.Context, s, id string, o ...RequestOptions) (Response[Success], error)

func (*Labels) List

func (*Labels) ListForChat

func (r *Labels) ListForChat(ctx context.Context, s, id string, p ListLabelsParams, o ...RequestOptions) (Response[Envelope[LabelRead]], error)

func (*Labels) ReplaceForChat

func (r *Labels) ReplaceForChat(ctx context.Context, s, id string, b ReplaceChatLabelsRequest, o ...RequestOptions) (Response[Success], error)

func (*Labels) Update

func (r *Labels) Update(ctx context.Context, s, id string, b UpdateLabelRequest, o ...RequestOptions) (Response[Success], error)

type LabelsUpdatePayload

type LabelsUpdatePayload struct {
	Action     string           `json:"action"`
	LabelID    string           `json:"labelId,omitempty"`
	From       *WebhookIdentity `json:"from,omitempty"`
	Label      string           `json:"label,omitempty"`
	Name       string           `json:"name,omitempty"`
	Color      *int             `json:"color,omitempty"`
	OrderIndex *int             `json:"orderIndex,omitempty"`
	Deleted    *bool            `json:"deleted,omitempty"`
	Labeled    *bool            `json:"labeled,omitempty"`
	ObservedAt *int64           `json:"observedAt,omitempty"`
	MessageID  string           `json:"messageId,omitempty"`
	Starred    *bool            `json:"starred,omitempty"`
	// contains filtered or unexported fields
}

type LaunchCampaignRequest

type LaunchCampaignRequest struct {
	SkipMissingVariables *bool    `json:"skipMissingVariables,omitempty"`
	ScheduledAt          *float64 `json:"scheduledAt,omitempty"`
}

func (*LaunchCampaignRequest) UnmarshalJSON

func (v *LaunchCampaignRequest) UnmarshalJSON(b []byte) error

type LaunchPlatformCampaignRequest

type LaunchPlatformCampaignRequest struct {
	ProjectID string `json:"projectId"`
	LaunchCampaignRequest
}

LaunchPlatformCampaignRequest selects an explicit project and retains false/zero.

func (*LaunchPlatformCampaignRequest) UnmarshalJSON

func (v *LaunchPlatformCampaignRequest) UnmarshalJSON(b []byte) error

type LeaveCallRequest

type LeaveCallRequest struct {
	ConnectionID string `json:"connectionId"`
	Participant  string `json:"participant,omitempty"`
}

type LifecycleFrame

type LifecycleFrame struct {
	Type         string            `json:"type"`
	Connection   string            `json:"connection,omitempty"`
	Participant  string            `json:"participant,omitempty"`
	Event        string            `json:"event,omitempty"`
	CallID       string            `json:"callId,omitempty"`
	Payload      json.RawMessage   `json:"payload,omitempty"`
	Timestamp    string            `json:"timestamp,omitempty"`
	ConnectionID string            `json:"connectionId,omitempty"`
	Candidate    *TrickleCandidate `json:"candidate,omitempty"`
	Code         string            `json:"code,omitempty"`
	Message      string            `json:"message,omitempty"`
}

type LinkedDeviceMessagePayload

type LinkedDeviceMessagePayload struct {
	ID                 string              `json:"id"`
	WhatsAppIDs        WhatsAppMessageIDs  `json:"whatsapp_ids"`
	WhatsAppID         string              `json:"whatsapp_id,omitempty"`
	Conversation       WebhookConversation `json:"conversation"`
	FromMe             bool                `json:"fromMe"`
	Timestamp          int64               `json:"timestamp"`
	PushName           string              `json:"pushName"`
	IsGroup            bool                `json:"isGroup"`
	Type               string              `json:"type"`
	Text               string              `json:"text,omitempty"`
	Caption            string              `json:"caption,omitempty"`
	MimeType           string              `json:"mimeType,omitempty"`
	PTT                *bool               `json:"ptt,omitempty"`
	Filename           string              `json:"filename,omitempty"`
	Latitude           *float64            `json:"latitude,omitempty"`
	Longitude          *float64            `json:"longitude,omitempty"`
	DisplayName        string              `json:"displayName,omitempty"`
	Title              string              `json:"title,omitempty"`
	Reaction           string              `json:"reaction,omitempty"`
	ReactionTo         string              `json:"reactionTo,omitempty"`
	RevokedID          string              `json:"revokedId,omitempty"`
	Media              string              `json:"media,omitempty"`
	MediaURL           string              `json:"mediaUrl,omitempty"`
	Edited             *bool               `json:"edited,omitempty"`
	PollOptions        []WebhookPollOption `json:"pollOptions,omitempty"`
	Unavailable        *bool               `json:"unavailable,omitempty"`
	UnavailableReason  string              `json:"unavailableReason,omitempty"`
	NativeFlowResponse *NativeFlowResponse `json:"nativeFlowResponse,omitempty"`
	ReplyChoice        *ReplyChoice        `json:"replyChoice,omitempty"`
	ParentMessageID    string              `json:"parentMessageId,omitempty"`
	Extra              PlatformPayload     `json:"-"`
	// contains filtered or unexported fields
}

func (LinkedDeviceMessagePayload) MarshalJSON

func (v LinkedDeviceMessagePayload) MarshalJSON() ([]byte, error)

func (*LinkedDeviceMessagePayload) UnmarshalJSON

func (v *LinkedDeviceMessagePayload) UnmarshalJSON(b []byte) error

type LinkedHistorySyncPayload

type LinkedHistorySyncPayload struct {
	WhatsAppIDs         WhatsAppMessageIDs      `json:"whatsapp_ids"`
	WhatsAppID          string                  `json:"whatsapp_id,omitempty"`
	OriginalWhatsAppIDs *WhatsAppMessageIDs     `json:"original_whatsapp_ids,omitempty"`
	OriginalWhatsAppID  string                  `json:"original_whatsapp_id,omitempty"`
	Messages            []WebhookHistoryMessage `json:"messages"`
	Mode                string                  `json:"mode"`
	SyncType            string                  `json:"syncType"`
	ChunkOrder          *int                    `json:"chunkOrder,omitempty"`
	Progress            *float64                `json:"progress,omitempty"`
	FileLength          int64                   `json:"fileLength"`
	ConversationCount   int                     `json:"conversationCount"`
	MessageCount        int                     `json:"messageCount"`
	PushNameCount       int                     `json:"pushNameCount"`
	StatusMessageCount  int                     `json:"statusMessageCount"`
	WhatsApp            WebhookEncodedHistory   `json:"whatsapp"`
	// contains filtered or unexported fields
}

type ListAudienceProfilesParams

type ListAudienceProfilesParams struct {
	Cursor *string
	Limit  *int
}

type ListAudienceSegmentsParams

type ListAudienceSegmentsParams struct{ ListParams }

type ListAuditLogsParams

type ListAuditLogsParams struct {
	Action, Resource string
	Limit            int
}

type ListBanSafeClaimsParams

type ListBanSafeClaimsParams struct {
	ListBanSafeHealthParams
	Connection, Status string
}

type ListBanSafeCollectionParams

type ListBanSafeCollectionParams = ListBanSafeHealthParams

type ListBanSafeEnforcementParams

type ListBanSafeEnforcementParams struct {
	ListBanSafeHealthParams
	Rung string
}

type ListBanSafeFindingsParams

type ListBanSafeFindingsParams struct {
	ListBanSafeHealthParams
	Connection, Status, Severity string
}

type ListBanSafeHealthActionsParams

type ListBanSafeHealthActionsParams struct {
	ListBanSafeHealthParams
	Connection, Status string
}

type ListBanSafeHealthHistoryParams

type ListBanSafeHealthHistoryParams struct {
	Since string
	Limit int
}

type ListBanSafeHealthParams

type ListBanSafeHealthParams struct {
	ListParams
	ProjectID string
}

type ListBanSafeIncidentsParams

type ListBanSafeIncidentsParams struct {
	ListBanSafeHealthParams
	Connection string
}

type ListBanSafeTelemetryHistoryParams

type ListBanSafeTelemetryHistoryParams struct {
	ListParams
	Since, Until string
}

type ListCallOptOutsParams

type ListCallOptOutsParams struct {
	ListParams
	PhoneNumber string
	BSUID       string
}

type ListCallRecordsParams

type ListCallRecordsParams struct {
	CallFilters
	ListParams
}

type ListCampaignRecipientsParams

type ListCampaignRecipientsParams struct {
	Reason CampaignRecipientFailureReason
	ListParams
	Status string
}

type ListCampaignsParams

type ListCampaignsParams struct{ ProjectID, ProjectSlug string }

type ListCloudCatalogProductsParams

type ListCloudCatalogProductsParams = ListCloudCatalogsParams

type ListCloudCatalogsParams

type ListCloudCatalogsParams struct {
	Version string
	Limit   int
	After   string
}

type ListConnectionCallsParams

type ListConnectionCallsParams struct {
	ListParams
	Direction string
	Outcome   string
	Since     string
	Until     string
}

ListConnectionCallsParams filters a Connection's calls. Since and Until are ISO 8601 times bounding when a call started.

type ListContent

type ListContent struct {
	Title       string        `json:"title"`
	Description string        `json:"description,omitempty"`
	ButtonText  string        `json:"buttonText"`
	Footer      string        `json:"footer,omitempty"`
	Sections    []ListSection `json:"sections"`
}

type ListCustomerEventsParams

type ListCustomerEventsParams struct {
	ProjectID string
	Limit     int
}

type ListCustomersParams

type ListCustomersParams struct {
	ProjectID string
	ListParams
	Search, Status                            string
	IsDefault, HasConnections, NeedsAttention *bool
}

type ListEventsParams

type ListEventsParams struct {
	ListParams
	AfterOffset string
	Type        string
	Since       string
	Until       string
}

type ListFlowEndpointReceiptsParams

type ListFlowEndpointReceiptsParams struct {
	ConnectionID string
	Limit        int
}

type ListFunctionsParams

type ListFunctionsParams struct {
	Limit  int
	Before string
}

type ListHistoryChatsParams

type ListHistoryChatsParams struct {
	ListParams
	Kind         string
	ActiveSince  string
	ActiveBefore string
}

type ListHistoryMessagesParams

type ListHistoryMessagesParams struct {
	ListParams
	Order     string
	Since     string
	Until     string
	Direction string
	Types     string
}

type ListIndexedEventsParams

type ListIndexedEventsParams struct {
	AfterOffset string
	Type        string
	Limit       int
}

type ListLabelsParams

type ListLabelsParams struct{ IncludeObservation *bool }

type ListOfficialGroupsParams

type ListOfficialGroupsParams struct {
	Limit  int
	Before string
	After  string
}

type ListOperationsParams

type ListOperationsParams struct {
	ListParams
	Status       string
	Kind         string
	ResourceType string
	ResourceID   string
	ProjectID    string
	Since        string
	Until        string
}

type ListParams

type ListParams struct {
	Limit  int
	Cursor string
}

type ListPlatformCampaignRecipientsParams

type ListPlatformCampaignRecipientsParams struct {
	ListCampaignRecipientsParams
	ProjectID string
}

type ListRequestLogsParams

type ListRequestLogsParams struct {
	RequestLogFilters
	ProjectID string
	Limit     *int
	Cursor    *string
}

type ListRow

type ListRow struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description,omitempty"`
}

type ListSection

type ListSection struct {
	Title string    `json:"title,omitempty"`
	Rows  []ListRow `json:"rows"`
}

type ListVoiceAudioParams

type ListVoiceAudioParams struct {
	ListParams
	Status string
}

type ListWebhookDeliveriesParams

type ListWebhookDeliveriesParams struct {
	ListParams
	WebhookID string
	EventID   string
	Status    string
	Since     string
	Until     string
}

type ListWebhooksParams

type ListWebhooksParams struct {
	ListParams
	EventType string
	Enabled   *bool
}

type LiveEventMetadata

type LiveEventMetadata struct{ Cursor string }

type LiveEventSubscription

type LiveEventSubscription struct {
	// contains filtered or unexported fields
}

func (*LiveEventSubscription) Cancel

func (s *LiveEventSubscription) Cancel()

func (*LiveEventSubscription) Done

func (s *LiveEventSubscription) Done() <-chan struct{}

type LiveEventSubscriptionOptions

type LiveEventSubscriptionOptions struct {
	Cursor  *string
	OnError func(error)
}

type LocationContent

type LocationContent struct {
	Latitude  float64 `json:"lat"`
	Longitude float64 `json:"long"`
	Address   string  `json:"address,omitempty"`
}

type ManagedFlowEncryptionKey

type ManagedFlowEncryptionKey struct {
	ID          string  `json:"id"`
	State       string  `json:"state"`
	Fingerprint string  `json:"fingerprint"`
	PublicKey   string  `json:"publicKey"`
	ErrorCode   *string `json:"errorCode"`
	CreatedAt   int64   `json:"createdAt"`
	ActivatedAt *int64  `json:"activatedAt"`
	RetireAfter *int64  `json:"retireAfter"`
}

type MarketingMessagesStatus

type MarketingMessagesStatus struct {
	WABAID                    string              `json:"wabaId"`
	Onboarding                MarketingOnboarding `json:"onboarding"`
	Terms                     MarketingTerms      `json:"terms"`
	CloudAPIMarketingDisabled *bool               `json:"cloudApiMarketingDisabled"`
	NextAction                string              `json:"nextAction"`
	GuideURL                  string              `json:"guideUrl"`
	ObservedAt                string              `json:"observedAt"`
}

type MarketingOnboarding

type MarketingOnboarding struct {
	Status     string  `json:"status"`
	MetaStatus *string `json:"metaStatus"`
}

type MarketingOnboardingUpdatedPayload

type MarketingOnboardingUpdatedPayload struct {
	Kind            string `json:"kind"`
	WABAID          string `json:"wabaId"`
	OwnerBusinessID string `json:"ownerBusinessId,omitempty"`
	MetaEvent       string `json:"metaEvent"`
	// contains filtered or unexported fields
}

type MarketingTerms

type MarketingTerms struct {
	Status     string  `json:"status"`
	MetaStatus *string `json:"metaStatus"`
	Date       *string `json:"date"`
}

type MediaContent

type MediaContent struct {
	Descriptor *WhatsAppMediaSendDescriptor `json:"-"`
	URL        string                       `json:"url,omitempty"`
	Base64     string                       `json:"base64,omitempty"`
	MimeType   string                       `json:"mimeType,omitempty"`
	Caption    string                       `json:"caption,omitempty"`
	Filename   string                       `json:"filename,omitempty"`
	PTT        *bool                        `json:"ptt,omitempty"`
}

type MediaControlFrame

type MediaControlFrame struct {
	WaitingRoom           *CallWaitingRoom `json:"state,omitempty"`
	OK                    *bool            `json:"ok,omitempty"`
	Operation             string           `json:"operation,omitempty"`
	Enabled               *bool            `json:"enabled,omitempty"`
	Type                  string           `json:"type"`
	CallID                string           `json:"callId,omitempty"`
	ConnectionID          string           `json:"connectionId,omitempty"`
	SampleRate            int              `json:"sampleRate,omitempty"`
	Video                 *bool            `json:"video,omitempty"`
	AudioMuted            *bool            `json:"audioMuted,omitempty"`
	VideoEnabled          *bool            `json:"videoEnabled,omitempty"`
	ScreenSharing         *bool            `json:"screenSharing,omitempty"`
	RequestID             string           `json:"requestId,omitempty"`
	Code                  string           `json:"code,omitempty"`
	Message               string           `json:"message,omitempty"`
	Participant           *CallParticipant `json:"participant,omitempty"`
	ParticipantID         string           `json:"participantId,omitempty"`
	Source                uint32           `json:"source,omitempty"`
	ConnectionParticipant string           `json:"connectionParticipant,omitempty"`
	Reason                string           `json:"reason,omitempty"`
	Emoji                 *string          `json:"emoji,omitempty"`
	Self                  *bool            `json:"self,omitempty"`
	Raised                *bool            `json:"raised,omitempty"`
	Supported             *bool            `json:"supported,omitempty"`
}

type MediaDownload

type MediaDownload struct {
	Body          io.ReadCloser
	ContentType   string
	ContentLength int64
	Filename      string
	Redirected    bool
	Metadata      Metadata
}

type MediaDownloadURL

type MediaDownloadURL struct {
	Streamed  bool
	URL       string
	ExpiresAt *time.Time
	RequestID string
}

func (MediaDownloadURL) GoString

func (d MediaDownloadURL) GoString() string

func (MediaDownloadURL) String

func (d MediaDownloadURL) String() string

type MediaFileOptions

type MediaFileOptions struct {
	Overwrite *bool
	MaxBytes  int64
}

MediaFileOptions replaces a destination only after a complete successful download. Set Overwrite to false to protect an existing file; nil defaults to true.

type MediaFileResult

type MediaFileResult struct {
	Path                          string
	Bytes                         int64
	MediaKind, MimeType, Filename string
	FileLength                    *int64
}

type MediaInfo

type MediaInfo struct {
	ID         string  `json:"id"`
	Connection string  `json:"connection"`
	MessageID  string  `json:"messageId"`
	MimeType   string  `json:"mimeType"`
	FileLength int64   `json:"fileLength"`
	Persisted  bool    `json:"persisted"`
	S3URL      *string `json:"s3Url,omitempty"`
}

type Members

type Members struct {
	// contains filtered or unexported fields
}

func (*Members) List

type MessageAckPayload

type MessageAckPayload struct {
	Messages     []WebhookMessageReference `json:"messages"`
	Conversation WebhookConversation       `json:"conversation"`
	From         *WebhookIdentity          `json:"from,omitempty"`
	Sender       *WebhookIdentity          `json:"sender,omitempty"`
	Type         string                    `json:"type"`
	Timestamp    int64                     `json:"timestamp"`
	Pricing      *MetaPricingReport        `json:"pricing,omitempty"`
	// contains filtered or unexported fields
}

type MessageButton

type MessageButton struct {
	Type                string `json:"type"`
	Text                string `json:"text"`
	URL                 string `json:"url,omitempty"`
	PhoneNumber         string `json:"phoneNumber,omitempty"`
	ID                  string `json:"id,omitempty"`
	CopyCode            string `json:"copyCode,omitempty"`
	BusinessPhoneNumber string `json:"businessPhoneNumber,omitempty"`
	CatalogProductID    string `json:"catalogProductId,omitempty"`
}

type MessageContent

type MessageContent struct {
	Sticker               *StickerContent               `json:"sticker,omitempty"`
	Text                  *string                       `json:"text,omitempty"`
	Image                 *MediaContent                 `json:"image,omitempty"`
	Video                 *MediaContent                 `json:"video,omitempty"`
	File                  *MediaContent                 `json:"file,omitempty"`
	Voice                 *MediaContent                 `json:"voice,omitempty"`
	Poll                  *PollContent                  `json:"poll,omitempty"`
	Location              *LocationContent              `json:"location,omitempty"`
	Contact               *ContactContent               `json:"contact,omitempty"`
	RequestPhoneNumber    *struct{}                     `json:"requestPhoneNumber,omitempty"`
	Product               *ProductContent               `json:"product,omitempty"`
	ProductList           *ProductListContent           `json:"productList,omitempty"`
	Order                 *OrderContent                 `json:"order,omitempty"`
	List                  *ListContent                  `json:"list,omitempty"`
	Carousel              *CarouselContent              `json:"carousel,omitempty"`
	Buttons               *ButtonsContent               `json:"buttons,omitempty"`
	AddressMessage        *AddressContent               `json:"addressMessage,omitempty"`
	Flow                  *FlowContent                  `json:"flow,omitempty"`
	CallPermissionRequest *CallPermissionRequestContent `json:"callPermissionRequest,omitempty"`
	OrderDetails          *OrderDetailsContent          `json:"orderDetails,omitempty"`
	OrderStatus           *OrderStatusContent           `json:"orderStatus,omitempty"`
	Template              *TemplateContent              `json:"template,omitempty"`
}

MessageContent is a tagged union: set exactly one field. Send validates this invariant before transport while leaving API business validation authoritative.

func (*MessageContent) UnmarshalJSON

func (content *MessageContent) UnmarshalJSON(data []byte) error

UnmarshalJSON preserves descriptor responses as typed secret-redacted values. The enclosing media kind supplies its HKDF identity; the wire object has none.

type MessageDeletePayload

type MessageDeletePayload struct {
	From         WebhookIdentity     `json:"from"`
	Sender       WebhookIdentity     `json:"sender"`
	ID           string              `json:"id"`
	WhatsAppIDs  WhatsAppMessageIDs  `json:"whatsapp_ids"`
	WhatsAppID   string              `json:"whatsapp_id,omitempty"`
	Conversation WebhookConversation `json:"conversation"`
	FromMe       bool                `json:"fromMe"`
	// contains filtered or unexported fields
}

type MessageEchoPayload

type MessageEchoPayload struct {
	Source string          `json:"source"`
	Value  PlatformPayload `json:"value"`
	// contains filtered or unexported fields
}

type MessageFailedPayload

type MessageFailedPayload struct {
	To         WebhookIdentity `json:"to"`
	Type       string          `json:"type"`
	Error      string          `json:"error"`
	Code       string          `json:"code,omitempty"`
	RetryAfter *float64        `json:"retryAfter,omitempty"`
	Timestamp  int64           `json:"timestamp"`
	// contains filtered or unexported fields
}

type MessageOperation

type MessageOperation struct {
	OperationID   string           `json:"operationId"`
	Status        string           `json:"status"`
	Transport     MessageTransport `json:"transport,omitempty"`
	RejectionCode string           `json:"rejectionCode,omitempty"`
	Receipt       *struct {
		WhatsAppIDs WhatsAppMessageIDs `json:"whatsapp_ids"`
		Timestamp   string             `json:"timestamp"`
	} `json:"receipt,omitempty"`
}

type MessageReceipt

type MessageReceipt struct {
	ID            string                `json:"id"`
	WhatsAppIDs   WhatsAppMessageIDs    `json:"whatsapp_ids"`
	WhatsAppID    string                `json:"whatsapp_id,omitempty"`
	Conversation  ConversationReference `json:"conversation"`
	Timestamp     string                `json:"timestamp"`
	Status        string                `json:"status"`
	Transport     MessageTransport      `json:"transport,omitempty"`
	RoutingReason string                `json:"routingReason,omitempty"`
	OperationID   string                `json:"operationId,omitempty"`
}

type MessageResult

type MessageResult struct {
	MessageReceipt
	Type    string          `json:"type"`
	Content *MessageContent `json:"content,omitempty"`
	MediaID string          `json:"mediaId,omitempty"`
}

type MessageSentPayload

type MessageSentPayload struct {
	ID           string              `json:"id"`
	WhatsAppIDs  WhatsAppMessageIDs  `json:"whatsapp_ids"`
	WhatsAppID   string              `json:"whatsapp_id,omitempty"`
	Conversation WebhookConversation `json:"conversation"`
	Type         string              `json:"type"`
	Timestamp    int64               `json:"timestamp"`
	// contains filtered or unexported fields
}

type MessageTransport

type MessageTransport string
const (
	TransportAuto          MessageTransport = "auto"
	TransportLinkedDevices MessageTransport = "linked_devices"
	TransportOfficialAPI   MessageTransport = "official_api"
)

type Messages

type Messages struct {
	// contains filtered or unexported fields
}

func (*Messages) MarkSeen

func (*Messages) OperationStatus

func (r *Messages) OperationStatus(ctx context.Context, connection, id string, opts ...RequestOptions) (Response[Envelope[MessageOperation]], error)

func (*Messages) React

func (*Messages) Send

Send validates one content variant and its interactive media before HTTP, then submits an idempotent request with descriptor-specific version handling.

func (*Messages) SetTyping

func (*Messages) Star

type MessagingBanSafe

type MessagingBanSafe struct {
	// contains filtered or unexported fields
}

func (*MessagingBanSafe) GetConnectionSafeMode

func (r *MessagingBanSafe) GetConnectionSafeMode(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[ConnectionSafeMode]], error)

func (*MessagingBanSafe) GetProjectHealthPolicy

func (r *MessagingBanSafe) GetProjectHealthPolicy(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[ProjectHealthPolicy]], error)

func (*MessagingBanSafe) GetProjectInsuranceEvidence

func (r *MessagingBanSafe) GetProjectInsuranceEvidence(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[ProjectInsuranceEvidence]], error)

func (*MessagingBanSafe) GetProjectSafeMode

func (r *MessagingBanSafe) GetProjectSafeMode(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[ProjectSafeMode]], error)

func (*MessagingBanSafe) GetProjectWarmupPlan

func (r *MessagingBanSafe) GetProjectWarmupPlan(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[ProjectWarmupPlan]], error)

func (*MessagingBanSafe) UpdateProjectSafeMode

type MessagingCampaigns

type MessagingCampaigns struct {
	// contains filtered or unexported fields
}

func (*MessagingCampaigns) AddRecipients

func (*MessagingCampaigns) Analytics

func (*MessagingCampaigns) Create

func (*MessagingCampaigns) CreateReplyFlow

func (*MessagingCampaigns) Enroll

Enroll adds a contact to a running or paused continuous drip; sent once.

func (*MessagingCampaigns) ExportRecipients

func (*MessagingCampaigns) GetReplyFlow

func (r *MessagingCampaigns) GetReplyFlow(ctx context.Context, project, id string, o ...RequestOptions) (Response[Envelope[CampaignReplyFlow]], error)

func (*MessagingCampaigns) Launch

func (*MessagingCampaigns) List

func (*MessagingCampaigns) ListRecipients

func (*MessagingCampaigns) Pause

func (*MessagingCampaigns) Requeue

func (*MessagingCampaigns) Reschedule

func (*MessagingCampaigns) Resume

func (*MessagingCampaigns) Retrieve

func (r *MessagingCampaigns) Retrieve(ctx context.Context, project, id string, o ...RequestOptions) (Response[Envelope[Campaign]], error)

func (*MessagingCampaigns) SetReplyFlow

func (*MessagingCampaigns) Stop

func (*MessagingCampaigns) TestSend

func (*MessagingCampaigns) Update

type MessagingClient

type MessagingClient struct {
	// contains filtered or unexported fields
}

MessagingClient accepts a team key, project token, or scoped client token. Resource-specific restrictions are enforced before HTTP.

func NewMessagingClient

func NewMessagingClient(c Config) (*MessagingClient, error)

func (*MessagingClient) BanSafe

func (c *MessagingClient) BanSafe() *MessagingBanSafe

func (*MessagingClient) Business

func (c *MessagingClient) Business() *Business

func (*MessagingClient) Campaigns

func (c *MessagingClient) Campaigns() *MessagingCampaigns

func (*MessagingClient) Catalogs

func (c *MessagingClient) Catalogs() *Catalogs

func (*MessagingClient) Channels

func (c *MessagingClient) Channels() *Channels

func (*MessagingClient) Chats

func (c *MessagingClient) Chats() *Chats

func (*MessagingClient) ClientTokens

func (c *MessagingClient) ClientTokens() *ClientTokens

func (*MessagingClient) CloudCatalogs

func (c *MessagingClient) CloudCatalogs() *CloudCatalogs

func (*MessagingClient) CloudMarketing

func (c *MessagingClient) CloudMarketing() *CloudMarketing

func (*MessagingClient) CloudOnboarding

func (c *MessagingClient) CloudOnboarding() *CloudOnboarding

func (*MessagingClient) CloudTemplates

func (c *MessagingClient) CloudTemplates() *CloudTemplates

func (*MessagingClient) ConnectionCalls

func (c *MessagingClient) ConnectionCalls() *ConnectionCalls

func (*MessagingClient) Connections

func (c *MessagingClient) Connections() *MessagingConnections

func (*MessagingClient) Contacts

func (c *MessagingClient) Contacts() *Contacts

func (*MessagingClient) FlowEncryption

func (c *MessagingClient) FlowEncryption() *FlowEncryption

func (*MessagingClient) Groups

func (c *MessagingClient) Groups() *Groups

func (*MessagingClient) HistorySync

func (client *MessagingClient) HistorySync() *HistorySyncResource
func (c *MessagingClient) HybridLink() *HybridLink

func (*MessagingClient) Identities

func (c *MessagingClient) Identities() *Identities

func (*MessagingClient) Labels

func (c *MessagingClient) Labels() *Labels

func (*MessagingClient) Media

func (c *MessagingClient) Media() *MessagingMedia

func (*MessagingClient) Messages

func (c *MessagingClient) Messages() *Messages

func (*MessagingClient) ObservationPolicies

func (c *MessagingClient) ObservationPolicies() *ObservationPolicies

func (*MessagingClient) OfficialGroups

func (c *MessagingClient) OfficialGroups() *OfficialGroups

func (*MessagingClient) Passkeys

func (c *MessagingClient) Passkeys() *Passkeys

func (*MessagingClient) Presence

func (c *MessagingClient) Presence() *Presence

func (*MessagingClient) Privacy

func (c *MessagingClient) Privacy() *Privacy

func (*MessagingClient) Profile

func (c *MessagingClient) Profile() *Profile
func (c *MessagingClient) QuickLinks() *QuickLinks

func (*MessagingClient) QuickReplies

func (c *MessagingClient) QuickReplies() *QuickReplies

func (*MessagingClient) Raw

func (*MessagingClient) Templates

func (c *MessagingClient) Templates() *Templates

func (*MessagingClient) Testing

func (c *MessagingClient) Testing() *Testing

func (*MessagingClient) Users

func (c *MessagingClient) Users() *Users

func (*MessagingClient) VoIP

func (c *MessagingClient) VoIP() *VoIP

func (*MessagingClient) Webhooks

func (c *MessagingClient) Webhooks() *MessagingWebhooks

func (*MessagingClient) WhatsAppMedia

func (client *MessagingClient) WhatsAppMedia() *WhatsAppMediaResource

type MessagingConnections

type MessagingConnections struct {
	// contains filtered or unexported fields
}

func (*MessagingConnections) Account

func (*MessagingConnections) Delete

func (*MessagingConnections) GetCloudCredentialHealth

func (r *MessagingConnections) GetCloudCredentialHealth(ctx context.Context, s string, o ...RequestOptions) (Response[Envelope[CloudCredentialHealth]], error)

func (*MessagingConnections) GetMetaPricing

func (*MessagingConnections) List

func (*MessagingConnections) Logout

func (*MessagingConnections) QR

func (*MessagingConnections) ReauthorizeCloudCredentials

func (r *MessagingConnections) ReauthorizeCloudCredentials(ctx context.Context, s string, opts ...RequestOptions) (Response[Envelope[CloudReauthorization]], error)

func (*MessagingConnections) RequestPairingCode

func (*MessagingConnections) Restart

func (*MessagingConnections) Retrieve

func (*MessagingConnections) Start

func (*MessagingConnections) Stop

func (*MessagingConnections) Update

type MessagingMedia

type MessagingMedia struct {
	// contains filtered or unexported fields
}

func (*MessagingMedia) Download

func (r *MessagingMedia) Download(ctx context.Context, id string, o ...RequestOptions) (Response[[]byte], error)

func (*MessagingMedia) DownloadStream

func (r *MessagingMedia) DownloadStream(ctx context.Context, id string, o ...RequestOptions) (*MediaDownload, error)

func (*MessagingMedia) DownloadToFile

func (r *MessagingMedia) DownloadToFile(ctx context.Context, id, path string, file MediaFileOptions, o ...RequestOptions) (APIMediaFileResult, error)

func (*MessagingMedia) DownloadURL

func (r *MessagingMedia) DownloadURL(ctx context.Context, id string, opts ...RequestOptions) (MediaDownloadURL, error)

func (*MessagingMedia) Persist

func (r *MessagingMedia) Persist(ctx context.Context, id string, o ...RequestOptions) (Response[Success], error)

func (*MessagingMedia) Retrieve

type MessagingWebhook

type MessagingWebhook struct {
	ID         string             `json:"id"`
	TenantID   string             `json:"tenantId"`
	Connection string             `json:"connection,omitempty"`
	URL        string             `json:"url"`
	Events     []string           `json:"events"`
	Retries    WebhookRetryConfig `json:"retries"`
	Headers    []WebhookHeader    `json:"headers"`
	Enabled    bool               `json:"enabled"`
	Format     string             `json:"format,omitempty"`
	CreatedAt  string             `json:"createdAt"`
}

type MessagingWebhooks

type MessagingWebhooks struct {
	// contains filtered or unexported fields
}

func (*MessagingWebhooks) Delete

func (*MessagingWebhooks) List

func (*MessagingWebhooks) Retrieve

type MetaPricingGroup

type MetaPricingGroup struct {
	Category     string  `json:"category"`
	PricingModel string  `json:"pricingModel"`
	PricingType  *string `json:"pricingType"`
	Billable     *bool   `json:"billable"`
	Messages     int64   `json:"messages"`
}

type MetaPricingParams

type MetaPricingParams struct{ Since, Until string }

type MetaPricingReport

type MetaPricingReport struct {
	Billable     *bool  `json:"billable,omitempty"`
	PricingModel string `json:"pricing_model,omitempty"`
	Category     string `json:"category,omitempty"`
	Type         string `json:"type,omitempty"`
}

type MetaPricingSummary

type MetaPricingSummary struct {
	Source   string             `json:"source"`
	Since    string             `json:"since"`
	Until    string             `json:"until"`
	Messages int64              `json:"messages"`
	Groups   []MetaPricingGroup `json:"groups"`
}

type Metadata

type Metadata struct {
	Status        int
	RequestID     string
	APIVersion    string
	Attempts      int
	Headers       http.Header
	Transport     string
	RoutingReason string
	OperationID   string
}

type MintClientTokenRequest

type MintClientTokenRequest struct {
	EphemeralID string `json:"ephemeralId"`
	TTLSeconds  *int   `json:"ttlSeconds,omitempty"`
	Connection  string `json:"connection,omitempty"`
	Customer    string `json:"customer,omitempty"`
	// A nil ceiling is omitted; an explicit empty slice seals zero actions.
	Allow []string `json:"allow,omitzero"`
}

type NativeFlowResponse

type NativeFlowResponse struct {
	Name       string `json:"name"`
	ParamsJSON string `json:"paramsJson"`
	Version    *int   `json:"version,omitempty"`
}

type NewChatCapping

type NewChatCapping struct {
	Enabled       *bool   `json:"enabled"`
	Pacing        bool    `json:"pacing"`
	Status        *string `json:"status"`
	Capped        bool    `json:"capped"`
	Limit         *int    `json:"limit"`
	Used          *int    `json:"used"`
	Remaining     *int    `json:"remaining"`
	CycleStartsAt *string `json:"cycleStartsAt"`
	ResetsAt      *string `json:"resetsAt"`
	ObservedAt    string  `json:"observedAt"`
}

type NewsletterUpdatePayload

type NewsletterUpdatePayload struct {
	ID     string `json:"id"`
	Action string `json:"action"`
	Muted  *bool  `json:"muted,omitempty"`
	// contains filtered or unexported fields
}

type Nullable

type Nullable[T any] struct{ Value *T }

Nullable separates an omitted pointer field from an explicit JSON null.

func (Nullable[T]) MarshalJSON

func (n Nullable[T]) MarshalJSON() ([]byte, error)

func (*Nullable[T]) UnmarshalJSON

func (n *Nullable[T]) UnmarshalJSON(b []byte) error

type NullableString

type NullableString struct{ Value *string }

NullableString preserves the difference between omitted and explicitly null.

func (NullableString) MarshalJSON

func (v NullableString) MarshalJSON() ([]byte, error)

type ObservationConfiguration

type ObservationConfiguration struct {
	PresenceMode   string `json:"presenceMode,omitempty"`
	TypingMode     string `json:"typingMode,omitempty"`
	LabelMode      string `json:"labelMode,omitempty"`
	QuickReplyMode string `json:"quickReplyMode,omitempty"`
}

type ObservationPolicies

type ObservationPolicies struct {
	// contains filtered or unexported fields
}

func (*ObservationPolicies) RetrieveForConnection

func (*ObservationPolicies) RetrieveForProject

type ObservationValues

type ObservationValues struct {
	PresenceMode   string `json:"presenceMode"`
	TypingMode     string `json:"typingMode"`
	LabelMode      string `json:"labelMode"`
	QuickReplyMode string `json:"quickReplyMode,omitempty"`
}

type ObservedQuickReply

type ObservedQuickReply struct {
	QuickReply
	AssociatedLabelIDs []string `json:"associatedLabelIds"`
	ObservedAt         string   `json:"observedAt"`
}

type OfficialGroup

type OfficialGroup struct {
	ID                   string                  `json:"id"`
	Subject              string                  `json:"subject,omitempty"`
	Description          string                  `json:"description,omitempty"`
	Suspended            *bool                   `json:"suspended,omitempty"`
	CreatedAt            string                  `json:"createdAt,omitempty"`
	ParticipantCount     *int                    `json:"participantCount,omitempty"`
	JoinApprovalRequired *bool                   `json:"joinApprovalRequired,omitempty"`
	Participants         []ConversationReference `json:"participants"`
}

type OfficialGroupAccepted

type OfficialGroupAccepted struct {
	Accepted bool `json:"accepted"`
}

type OfficialGroupCursorParams

type OfficialGroupCursorParams struct {
	Before string
	After  string
}

type OfficialGroupCursors

type OfficialGroupCursors struct {
	Before string `json:"before,omitempty"`
	After  string `json:"after,omitempty"`
}
type OfficialGroupInviteLink struct {
	InviteLink string `json:"inviteLink"`
}

type OfficialGroupJoinDecision

type OfficialGroupJoinDecision struct {
	Succeeded []string                   `json:"succeeded"`
	Failed    []OfficialGroupJoinFailure `json:"failed"`
}

type OfficialGroupJoinError

type OfficialGroupJoinError struct {
	Code  int    `json:"code"`
	Title string `json:"title,omitempty"`
}

type OfficialGroupJoinFailure

type OfficialGroupJoinFailure struct {
	JoinRequestID string                   `json:"joinRequestId"`
	Errors        []OfficialGroupJoinError `json:"errors"`
}

type OfficialGroupJoinRequest

type OfficialGroupJoinRequest struct {
	JoinRequestID string                `json:"joinRequestId"`
	User          ConversationReference `json:"user"`
	CreatedAt     string                `json:"createdAt,omitempty"`
}

type OfficialGroupJoinRequestList

type OfficialGroupJoinRequestList struct {
	Items   []OfficialGroupJoinRequest `json:"items"`
	Cursors OfficialGroupCursors       `json:"cursors"`
	HasMore bool                       `json:"hasMore"`
}

type OfficialGroupList

type OfficialGroupList struct {
	Groups  []OfficialGroupSummary `json:"groups"`
	Cursors OfficialGroupCursors   `json:"cursors"`
	HasMore bool                   `json:"hasMore"`
}

type OfficialGroupSummary

type OfficialGroupSummary struct {
	ID        string `json:"id"`
	Subject   string `json:"subject,omitempty"`
	CreatedAt string `json:"createdAt,omitempty"`
}

type OfficialGroupWebhookError

type OfficialGroupWebhookError struct {
	Code  int    `json:"code"`
	Title string `json:"title,omitempty"`
}

type OfficialGroups

type OfficialGroups struct {
	// contains filtered or unexported fields
}

func (*OfficialGroups) ApproveJoinRequests

func (r *OfficialGroups) ApproveJoinRequests(ctx context.Context, s, id string, ids []string, o ...RequestOptions) (Response[Envelope[OfficialGroupJoinDecision]], error)

func (*OfficialGroups) Delete

func (*OfficialGroups) RejectJoinRequests

func (r *OfficialGroups) RejectJoinRequests(ctx context.Context, s, id string, ids []string, o ...RequestOptions) (Response[Envelope[OfficialGroupJoinDecision]], error)

func (*OfficialGroups) RemoveParticipants

func (r *OfficialGroups) RemoveParticipants(ctx context.Context, s, id string, participants []string, o ...RequestOptions) (Response[Envelope[OfficialGroupAccepted]], error)

func (*OfficialGroups) Retrieve

func (*OfficialGroups) SetPicture

func (r *OfficialGroups) SetPicture(ctx context.Context, s, id string, jpeg []byte, o ...RequestOptions) (Response[Envelope[OfficialGroupAccepted]], error)

SetPicture sends JPEG bytes as multipart file; the server checks image dimensions.

type Operation

type Operation struct {
	ID        string  `json:"id"`
	TeamID    string  `json:"teamId"`
	ProjectID *string `json:"projectId"`
	Kind      string  `json:"kind"`
	Resource  struct {
		Type string `json:"type"`
		ID   string `json:"id"`
	} `json:"resource"`
	Status       string `json:"status"`
	Sequence     int64  `json:"sequence"`
	Capabilities struct {
		Cancellable bool `json:"cancellable"`
		Watchable   bool `json:"watchable"`
	} `json:"capabilities"`
	Progress       *OperationProgress       `json:"progress"`
	Result         json.RawMessage          `json:"result"`
	Error          *OperationError          `json:"error"`
	ActionRequired *OperationActionRequired `json:"actionRequired"`
	CreatedAt      string                   `json:"createdAt"`
	UpdatedAt      string                   `json:"updatedAt"`
	CompletedAt    *string                  `json:"completedAt"`
}

type OperationAccepted

type OperationAccepted struct {
	Success     bool   `json:"success"`
	Message     string `json:"message"`
	OperationID string `json:"operationId"`
}

type OperationActionRequired

type OperationActionRequired struct {
	Code    string          `json:"code"`
	Details json.RawMessage `json:"details"`
}

type OperationCancellationReceipt

type OperationCancellationReceipt struct {
	Operation   Operation          `json:"operation"`
	OperationID string             `json:"operationId"`
	Idempotency IdempotencyReceipt `json:"idempotency"`
}

type OperationError

type OperationError struct {
	Code      string          `json:"code"`
	Retryable bool            `json:"retryable"`
	Details   json.RawMessage `json:"details"`
}

type OperationProgress

type OperationProgress struct {
	Code    string `json:"code"`
	Current *int64 `json:"current"`
	Total   *int64 `json:"total"`
}

type OperationTransition

type OperationTransition struct {
	OperationID string  `json:"operationId"`
	Sequence    int64   `json:"sequence"`
	FromStatus  *string `json:"fromStatus"`
	ToStatus    string  `json:"toStatus"`
	ReasonCode  *string `json:"reasonCode"`
	OccurredAt  string  `json:"occurredAt"`
	Snapshot    struct {
		Progress       *OperationProgress       `json:"progress"`
		Error          *OperationError          `json:"error"`
		ActionRequired *OperationActionRequired `json:"actionRequired"`
	} `json:"snapshot"`
}

type Operations

type Operations struct {
	// contains filtered or unexported fields
}

func (*Operations) Cancel

func (*Operations) Get

func (*Operations) List

func (*Operations) ListTransitions

func (r *Operations) ListTransitions(ctx context.Context, id string, p ListParams, afterSequence *int64, o ...RequestOptions) (*CursorPage[OperationTransition], error)

func (*Operations) Wait

type OptOutSettings

type OptOutSettings struct {
	Enabled        bool     `json:"enabled"`
	OptOutKeywords []string `json:"optOutKeywords"`
	OptInKeywords  []string `json:"optInKeywords"`
	UpdatedAt      *int64   `json:"updatedAt"`
}

type OptOuts

type OptOuts struct {
	// contains filtered or unexported fields
}

func (*OptOuts) Create

func (*OptOuts) CreateBatch

func (*OptOuts) Delete

func (*OptOuts) GetConfirmationSettings

func (r *OptOuts) GetConfirmationSettings(ctx context.Context, o ...RequestOptions) (Response[Envelope[StopConfirmationSettings]], error)

func (*OptOuts) GetConfirmationSummary

func (r *OptOuts) GetConfirmationSummary(ctx context.Context, o ...RequestOptions) (Response[Envelope[StopConfirmationSummary]], error)

func (*OptOuts) GetSettings

func (r *OptOuts) GetSettings(ctx context.Context, o ...RequestOptions) (Response[Envelope[OptOutSettings]], error)

func (*OptOuts) List

type OrderContent

type OrderContent struct {
	ID                string `json:"id"`
	ThumbnailBase64   string `json:"thumbnailBase64,omitempty"`
	ItemCount         int    `json:"itemCount"`
	Status            string `json:"status"`
	Message           string `json:"message,omitempty"`
	Title             string `json:"title,omitempty"`
	SellerID          string `json:"sellerId"`
	Token             string `json:"token,omitempty"`
	TotalAmount1000   int64  `json:"totalAmount1000"`
	TotalCurrencyCode string `json:"totalCurrencyCode"`
	CatalogType       string `json:"catalogType,omitempty"`
}

type OrderDetailsContent

type OrderDetailsContent struct {
	ReferenceID     string            `json:"referenceId"`
	Type            string            `json:"type"`
	Body            string            `json:"body"`
	Footer          string            `json:"footer,omitempty"`
	Currency        string            `json:"currency"`
	TotalAmount     PaymentAmount     `json:"totalAmount"`
	PaymentSettings PaymentSettings   `json:"paymentSettings"`
	Order           *OrderItemization `json:"order,omitempty"`
	HeaderImageURL  string            `json:"headerImageUrl,omitempty"`
}

type OrderExpiration

type OrderExpiration struct {
	Timestamp   int64  `json:"timestamp"`
	Description string `json:"description"`
}

type OrderItem

type OrderItem struct {
	RetailerID string         `json:"retailerId"`
	Name       string         `json:"name"`
	Amount     PaymentAmount  `json:"amount"`
	Quantity   int            `json:"quantity"`
	SaleAmount *PaymentAmount `json:"saleAmount,omitempty"`
}

type OrderItemization

type OrderItemization struct {
	CatalogID  string           `json:"catalogId,omitempty"`
	Expiration *OrderExpiration `json:"expiration,omitempty"`
	Items      []OrderItem      `json:"items"`
	Subtotal   PaymentAmount    `json:"subtotal"`
	Tax        PaymentAmount    `json:"tax"`
	Shipping   *PaymentAmount   `json:"shipping,omitempty"`
	Discount   *PaymentAmount   `json:"discount,omitempty"`
}

type OrderPaymentConversation

type OrderPaymentConversation struct {
	BSUID       string `json:"bsuid,omitempty"`
	ParentBSUID string `json:"parentBsuid,omitempty"`
	ID          string `json:"id,omitempty"`
	PhoneNumber string `json:"phoneNumber,omitempty"`
}

type OrderPaymentMethodSelectedPayload

type OrderPaymentMethodSelectedPayload struct {
	OrderPaymentUpdateBase
	MessageID        string `json:"messageId"`
	PaymentMethod    string `json:"paymentMethod"`
	LastFourDigits   string `json:"lastFourDigits,omitempty"`
	CredentialID     string `json:"credentialId,omitempty"`
	PaymentTimestamp *int64 `json:"paymentTimestamp,omitempty"`
}

type OrderPaymentStatusPayload

type OrderPaymentStatusPayload struct {
	OrderPaymentUpdateBase
	Status      string                     `json:"status"`
	Amount      *WebhookPaymentAmount      `json:"amount,omitempty"`
	Currency    string                     `json:"currency,omitempty"`
	Transaction *WebhookPaymentTransaction `json:"transaction,omitempty"`
}

type OrderPaymentUpdateBase

type OrderPaymentUpdateBase struct {
	ReportedBy      string                   `json:"reportedBy"`
	ProviderEventID string                   `json:"providerEventId"`
	ReferenceID     string                   `json:"referenceId"`
	Conversation    OrderPaymentConversation `json:"conversation"`
	Kind            string                   `json:"kind"`
	// contains filtered or unexported fields
}

type OrderPaymentValue

type OrderPaymentValue struct {
	Status    string `json:"status"`
	Timestamp *int64 `json:"timestamp,omitempty"`
}

type OrderStatusContent

type OrderStatusContent struct {
	ReferenceID string             `json:"referenceId"`
	Body        string             `json:"body"`
	Footer      string             `json:"footer,omitempty"`
	Order       *OrderStatusValue  `json:"order,omitempty"`
	Payment     *OrderPaymentValue `json:"payment,omitempty"`
}

type OrderStatusValue

type OrderStatusValue struct {
	Status      string `json:"status"`
	Description string `json:"description,omitempty"`
}

type PageResult

type PageResult[T any] struct {
	Items      []T
	NextCursor string
}

type PairingCode

type PairingCode struct {
	Code string `json:"code"`
}

type PairingCodeRequest

type PairingCodeRequest struct {
	Phone string `json:"phone"`
}

type PasskeyAssertion

type PasskeyAssertion struct {
	ID          string                   `json:"id"`
	RawIDB64URL string                   `json:"rawIdB64Url"`
	Response    PasskeyAssertionResponse `json:"response"`
}

type PasskeyAssertionResponse

type PasskeyAssertionResponse struct {
	AuthenticatorDataB64 string  `json:"authenticatorDataB64"`
	ClientDataJSONB64    string  `json:"clientDataJSONB64"`
	SignatureB64         string  `json:"signatureB64"`
	UserHandleB64        *string `json:"userHandleB64,omitempty"`
}

type PasskeyAssertionResult

type PasskeyAssertionResult struct {
	OK         bool   `json:"ok"`
	Ticket     string `json:"ticket"`
	Connection string `json:"connection"`
}

type PasskeyConfirmation

type PasskeyConfirmation struct {
	Status        string  `json:"status"`
	TicketID      *string `json:"ticketId,omitempty"`
	Code          *string `json:"code,omitempty"`
	SkipHandoffUX *bool   `json:"skipHandoffUX,omitempty"`
	Error         *string `json:"error,omitempty"`
}

type PasskeyTicket

type PasskeyTicket struct {
	Version          int    `json:"version"`
	Ticket           string `json:"ticket"`
	Connection       string `json:"connection"`
	RPID             string `json:"rpId"`
	ChallengeB64URL  string `json:"challengeB64Url"`
	UserVerification string `json:"userVerification"`
	ExpiresAt        string `json:"expiresAt"`
	TimeoutMS        *int64 `json:"timeoutMs,omitempty"`
}

type Passkeys

type Passkeys struct {
	// contains filtered or unexported fields
}

Passkeys relays supplied assertions. It never runs a browser ceremony.

func (*Passkeys) GetChallenge

func (r *Passkeys) GetChallenge(ctx context.Context, s, ticket string, o ...RequestOptions) (Response[Envelope[PasskeyTicket]], error)

func (*Passkeys) GetConfirmation

func (r *Passkeys) GetConfirmation(ctx context.Context, s string, o ...RequestOptions) (Response[Envelope[PasskeyConfirmation]], error)

func (*Passkeys) IssueChallenge

type PaymentAmount

type PaymentAmount struct {
	Value       int64  `json:"value"`
	Offset      int    `json:"offset"`
	Description string `json:"description,omitempty"`
	ProgramName string `json:"programName,omitempty"`
}
type PaymentLink struct {
	URI string `json:"uri"`
}

type PaymentSettings

type PaymentSettings struct {
	PixDynamicCode *PixDynamicCode `json:"pixDynamicCode,omitempty"`
	PaymentLink    *PaymentLink    `json:"paymentLink,omitempty"`
	Boleto         *Boleto         `json:"boleto,omitempty"`
}

type PictureRequest

type PictureRequest struct {
	URL    string `json:"url,omitempty"`
	Base64 string `json:"base64,omitempty"`
}

type PinOfficialGroupMessageRequest

type PinOfficialGroupMessageRequest struct {
	Operation      string `json:"operation"`
	MessageID      string `json:"messageId"`
	ExpirationDays *int   `json:"expirationDays,omitempty"`
}

type PingResponse

type PingResponse struct {
	Status string `json:"status"`
}

type PixDynamicCode

type PixDynamicCode struct {
	Code         string `json:"code"`
	MerchantName string `json:"merchantName"`
	Key          string `json:"key"`
	KeyType      string `json:"keyType"`
}

type PlaceCallRequest

type PlaceCallRequest struct {
	To           string   `json:"to,omitempty"`
	Participants []string `json:"participants,omitempty"`
	GroupID      string   `json:"groupId,omitempty"`
	Connection   string   `json:"connection,omitempty"`
	Video        *bool    `json:"video,omitempty"`
	Exclusive    *bool    `json:"exclusive,omitempty"`
	Participant  string   `json:"participant,omitempty"`
}

type PlacedCall

type PlacedCall struct {
	CallID     string `json:"callId"`
	Connection string `json:"connection"`
	Video      bool   `json:"video"`
}

type PlatformCalls

type PlatformCalls struct {
	// contains filtered or unexported fields
}

func (*PlatformCalls) ExportAll

func (*PlatformCalls) List

func (*PlatformCalls) Retrieve

func (*PlatformCalls) Stats

type PlatformCampaign

type PlatformCampaign struct {
	Campaign
	Extra PlatformPayload `json:"-"`
}

func (PlatformCampaign) MarshalJSON

func (v PlatformCampaign) MarshalJSON() ([]byte, error)

func (*PlatformCampaign) UnmarshalJSON

func (v *PlatformCampaign) UnmarshalJSON(b []byte) error

type PlatformCampaignAnalytics

type PlatformCampaignAnalytics struct {
	CampaignAnalytics
}

type PlatformCampaignOperation

type PlatformCampaignOperation struct {
	PlatformCampaign
	OperationID string `json:"operationId"`
}

func (PlatformCampaignOperation) MarshalJSON

func (v PlatformCampaignOperation) MarshalJSON() ([]byte, error)

func (*PlatformCampaignOperation) UnmarshalJSON

func (v *PlatformCampaignOperation) UnmarshalJSON(b []byte) error

type PlatformCampaignParams

type PlatformCampaignParams struct{ ProjectID string }

type PlatformCampaignRecipientExportParams

type PlatformCampaignRecipientExportParams struct {
	CampaignRecipientExportParams
	ProjectID string
}

type PlatformCampaignTestSendRequest

type PlatformCampaignTestSendRequest struct {
	CampaignTestSendRequest
	ProjectID string `json:"projectId"`
}

type PlatformConnection

type PlatformConnection struct {
	ID           string  `json:"_id"`
	CreationTime int64   `json:"_creationTime"`
	ProjectID    string  `json:"projectId"`
	ConnectionID string  `json:"connectionId"`
	Name         string  `json:"name"`
	Phone        *string `json:"phone"`
	Platform     *string `json:"platform"`
	IsBusiness   bool    `json:"isBusiness"`
	TestMode     bool    `json:"testMode"`
	TierOverride *string `json:"tierOverride"`
	Status       string  `json:"status"`
	MessageCount int64   `json:"messageCount"`
	LastActiveAt *int64  `json:"lastActiveAt"`
	PaidUntil    *int64  `json:"paidUntil"`
}

type PlatformConnections

type PlatformConnections struct {
	// contains filtered or unexported fields
}

func (*PlatformConnections) Delete

func (*PlatformConnections) GetCapabilities

func (*PlatformConnections) GetSafeMode

func (*PlatformConnections) List

func (*PlatformConnections) Retrieve

func (*PlatformConnections) RetrieveTierChange

func (r *PlatformConnections) RetrieveTierChange(ctx context.Context, id, quoteID string, o ...RequestOptions) (Response[Envelope[ConnectionTierChange]], error)

func (*PlatformConnections) Update

type PlatformEvent

type PlatformEvent struct {
	ID                  string               `json:"id"`
	TeamID              string               `json:"teamId"`
	ProjectID           *string              `json:"projectId"`
	Type                string               `json:"type"`
	Source              string               `json:"source"`
	Environment         string               `json:"environment"`
	CreatedAt           string               `json:"createdAt"`
	PayloadAvailability string               `json:"payloadAvailability"`
	Payload             *EncodedEventPayload `json:"payload"`
	ReplayableUntil     *string              `json:"replayableUntil"`
	MetadataExpiresAt   string               `json:"metadataExpiresAt"`
}

type PlatformMedia

type PlatformMedia struct {
	// contains filtered or unexported fields
}

func (*PlatformMedia) CreateUpload

func (*PlatformMedia) Delete

func (*PlatformMedia) Retrieve

type PlatformPayload

type PlatformPayload map[string]json.RawMessage

PlatformPayload is intentionally open in the pinned TypeScript contract. Strict resource schemas use their own handwritten request/response structs.

type PlatformWebhook

type PlatformWebhook struct {
	Batching    WebhookBatching         `json:"batching"`
	ID          string                  `json:"id"`
	TeamID      string                  `json:"teamId"`
	Owner       string                  `json:"owner"`
	ProjectID   *string                 `json:"projectId"`
	URL         string                  `json:"url"`
	EventTypes  []string                `json:"eventTypes"`
	Enabled     bool                    `json:"enabled"`
	Format      string                  `json:"format"`
	RetryPolicy WebhookRetryPolicy      `json:"retryPolicy"`
	Headers     []WebhookHeaderMetadata `json:"headers"`
	Secret      WebhookSecretMetadata   `json:"secret"`
	CreatedAt   string                  `json:"createdAt"`
	UpdatedAt   string                  `json:"updatedAt"`
}

type PollContent

type PollContent struct {
	Title       string   `json:"title"`
	Options     []string `json:"options"`
	MultiSelect *bool    `json:"multiSelect,omitempty"`
}

type PollVotePayload

type PollVotePayload struct {
	Conversation   WebhookConversation `json:"conversation"`
	PollMessageID  string              `json:"pollMessageId"`
	Voter          WebhookIdentity     `json:"voter"`
	SelectedHashes []string            `json:"selectedHashes"`
	Timestamp      int64               `json:"timestamp"`
	// contains filtered or unexported fields
}

type Presence

type Presence struct {
	// contains filtered or unexported fields
}

func (*Presence) Get

func (*Presence) GetForChat

func (r *Presence) GetForChat(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[ChatPresenceData]], error)

func (*Presence) Set

func (*Presence) Subscribe

type PresenceData

type PresenceData struct {
	Desired       string `json:"desired,omitempty"`
	DesiredAt     string `json:"desiredAt,omitempty"`
	LastSent      string `json:"lastSent,omitempty"`
	LastSentAt    string `json:"lastSentAt,omitempty"`
	Authoritative bool   `json:"authoritative"`
}

type PresenceMutationResult

type PresenceMutationResult struct {
	Success bool   `json:"success"`
	Message string `json:"message,omitempty"`
	Data    *struct {
		Status    string `json:"status,omitempty"`
		RequestID string `json:"requestId,omitempty"`
		ExpiresAt string `json:"expiresAt,omitempty"`
	} `json:"data,omitempty"`
}

type PresenceUpdatePayload

type PresenceUpdatePayload struct {
	ObservedAt  int64            `json:"observedAt"`
	From        *WebhookIdentity `json:"from,omitempty"`
	Sender      *WebhookIdentity `json:"sender,omitempty"`
	State       string           `json:"state,omitempty"`
	Media       string           `json:"media,omitempty"`
	Unavailable *bool            `json:"unavailable,omitempty"`
	LastSeen    *int64           `json:"lastSeen,omitempty"`
	// contains filtered or unexported fields
}

type PreviewCallLinkRequest

type PreviewCallLinkRequest struct {
	CreateCallLinkRequest
	Token string `json:"token"`
}

type PreviewProjectTemplateRequest

type PreviewProjectTemplateRequest struct {
	Values  map[string]string `json:"values,omitempty"`
	Surface string            `json:"surface,omitempty"`
}
type PreviewedCallLink struct {
	Connection       string                `json:"connection"`
	Video            bool                  `json:"video"`
	Creator          ConversationReference `json:"creator"`
	ApprovalRequired bool                  `json:"approvalRequired"`
	IsAdmin          bool                  `json:"isAdmin"`
}

type Privacy

type Privacy struct {
	// contains filtered or unexported fields
}

func (*Privacy) Get

func (*Privacy) SetDefaultDisappearingTimer

func (r *Privacy) SetDefaultDisappearingTimer(ctx context.Context, s string, b DisappearingTimerRequest, o ...RequestOptions) (Response[Success], error)

type PrivacySettingName

type PrivacySettingName string

PrivacySettingName and PrivacySettingValue retain the named privacy boundary.

type PrivacySettingValue

type PrivacySettingValue string

type PrivacySettings

type PrivacySettings struct {
	GroupAdd     string `json:"groupAdd"`
	LastSeen     string `json:"lastSeen"`
	Status       string `json:"status"`
	Profile      string `json:"profile"`
	ReadReceipts string `json:"readReceipts"`
	Online       string `json:"online"`
	CallAdd      string `json:"callAdd"`
	Messages     string `json:"messages"`
	Defense      string `json:"defense"`
	Stickers     string `json:"stickers"`
}

type ProductContent

type ProductContent struct {
	BusinessOwnerID     string        `json:"businessOwnerId"`
	ID                  string        `json:"id"`
	Title               string        `json:"title"`
	Description         string        `json:"description,omitempty"`
	CurrencyCode        string        `json:"currencyCode"`
	PriceAmount1000     int64         `json:"priceAmount1000"`
	SalePriceAmount1000 *int64        `json:"salePriceAmount1000,omitempty"`
	RetailerID          string        `json:"retailerId,omitempty"`
	URL                 string        `json:"url,omitempty"`
	ImageCount          *int          `json:"imageCount,omitempty"`
	Image               *MediaContent `json:"image,omitempty"`
	Body                string        `json:"body,omitempty"`
	Footer              string        `json:"footer,omitempty"`
}

type ProductListContent

type ProductListContent struct {
	BusinessOwnerID string               `json:"businessOwnerId"`
	Title           string               `json:"title"`
	Description     string               `json:"description,omitempty"`
	ButtonText      string               `json:"buttonText"`
	Footer          string               `json:"footer,omitempty"`
	Sections        []ProductListSection `json:"sections"`
}

type ProductListSection

type ProductListSection struct {
	Title      string   `json:"title,omitempty"`
	ProductIDs []string `json:"productIds"`
}

type ProductionBusiness

type ProductionBusiness struct {
	Name         string `json:"name"`
	Website      string `json:"website"`
	SupportEmail string `json:"supportEmail"`
}

type ProductionEnrollmentCommandResult

type ProductionEnrollmentCommandResult struct {
	OperationID string `json:"operationId"`
	Action      string `json:"action"`
	Accepted    bool   `json:"accepted"`
}

type ProductionEnrollmentRequest

type ProductionEnrollmentRequest struct {
	Business ProductionBusiness `json:"business"`
}

type ProductionEnrollmentResult

type ProductionEnrollmentResult struct {
	ID               string `json:"id"`
	TeamID           string `json:"teamId"`
	Name             string `json:"name"`
	Slug             string `json:"slug"`
	Stage            string `json:"stage"`
	OperationID      string `json:"operationId"`
	EnrollmentStatus string `json:"enrollmentStatus"`
	BillingMode      string `json:"billingMode"`
}

type Profile

type Profile struct {
	// contains filtered or unexported fields
}

func (*Profile) DeletePicture

func (r *Profile) DeletePicture(ctx context.Context, s string, o ...RequestOptions) (Response[Success], error)

func (*Profile) Get

func (*Profile) SetName

func (r *Profile) SetName(ctx context.Context, s, name string, o ...RequestOptions) (Response[Success], error)

func (*Profile) SetPicture

func (r *Profile) SetPicture(ctx context.Context, s string, b PictureRequest, o ...RequestOptions) (Response[Success], error)

func (*Profile) SetStatus

func (r *Profile) SetStatus(ctx context.Context, s, status string, o ...RequestOptions) (Response[Success], error)

type ProfileData

type ProfileData struct {
	Name              string `json:"name"`
	Status            string `json:"status"`
	ProfilePictureURL string `json:"profilePicUrl,omitempty"`
	PhonePlatform     string `json:"phonePlatform,omitempty"`
	AccountType       string `json:"accountType,omitempty"`
}

type Project

type Project struct {
	ID          string      `json:"id"`
	TeamID      string      `json:"teamId"`
	Name        string      `json:"name"`
	Slug        string      `json:"slug"`
	Icon        ProjectIcon `json:"icon"`
	DefaultTier string      `json:"defaultTier"`
	IsActive    bool        `json:"isActive"`
	Stage       string      `json:"stage"`
}

type ProjectCampaigns

type ProjectCampaigns struct {
	// contains filtered or unexported fields
}

ProjectCampaigns exposes only the seven project-confined campaign operations. A resource retains its selected project; requests cannot retarget it.

func (*ProjectCampaigns) GetReplyFlow

func (*ProjectCampaigns) ListLaunchApprovals

func (r *ProjectCampaigns) ListLaunchApprovals(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[[]CampaignLaunchApproval]], error)

func (*ProjectCampaigns) TestSend

type ProjectClient

type ProjectClient struct {
	// contains filtered or unexported fields
}

func NewProjectClient

func NewProjectClient(c Config, projectID string) (*ProjectClient, error)

func (*ProjectClient) Analytics

func (c *ProjectClient) Analytics() *Analytics

func (*ProjectClient) CallRetention

func (c *ProjectClient) CallRetention() *CallRetentionResource

func (*ProjectClient) Calls

func (c *ProjectClient) Calls() *PlatformCalls

func (*ProjectClient) Campaigns

func (c *ProjectClient) Campaigns() *ProjectCampaigns

func (*ProjectClient) ConnectionConfiguration

func (c *ProjectClient) ConnectionConfiguration() *ConnectionConfigurationResource

func (*ProjectClient) Events

func (c *ProjectClient) Events() *Events

func (*ProjectClient) Flows

func (c *ProjectClient) Flows() *Flows

func (*ProjectClient) Functions

func (c *ProjectClient) Functions() *Functions

func (*ProjectClient) Operations

func (c *ProjectClient) Operations() *Operations

func (*ProjectClient) Project

func (c *ProjectClient) Project(id string) (*ProjectClient, error)

func (*ProjectClient) ProjectID

func (c *ProjectClient) ProjectID() string

func (*ProjectClient) QuickLinkSettings

func (c *ProjectClient) QuickLinkSettings() *QuickLinkSettingsResource

func (*ProjectClient) Raw

func (*ProjectClient) RequestLogs

func (c *ProjectClient) RequestLogs() *RequestLogs

func (*ProjectClient) SIPTrunks

func (c *ProjectClient) SIPTrunks() *SIPTrunks

func (*ProjectClient) SignalCustody

func (c *ProjectClient) SignalCustody() *SignalCustodyResource

func (*ProjectClient) Usage

func (c *ProjectClient) Usage() *Usage

func (*ProjectClient) Voice

func (c *ProjectClient) Voice() *ProjectVoice

func (*ProjectClient) WebhookDeliveries

func (c *ProjectClient) WebhookDeliveries() *WebhookDeliveries

func (*ProjectClient) Webhooks

func (c *ProjectClient) Webhooks() *Webhooks

type ProjectHealthPolicy

type ProjectHealthPolicy struct {
	ProjectID           string                          `json:"projectId"`
	Version             int64                           `json:"version"`
	Enabled             bool                            `json:"enabled"`
	Threshold           float64                         `json:"threshold"`
	ConnectionAction    string                          `json:"connectionAction"`
	SlowDownMPS         *float64                        `json:"slowDownMps"`
	EmailNotification   bool                            `json:"emailNotification"`
	WebhookNotification bool                            `json:"webhookNotification"`
	Integrations        ProjectHealthPolicyIntegrations `json:"integrations"`
}

type ProjectHealthPolicyIntegrations

type ProjectHealthPolicyIntegrations struct {
	EmailConfigured   bool `json:"emailConfigured"`
	WebhookConfigured bool `json:"webhookConfigured"`
}

type ProjectIcon

type ProjectIcon struct {
	Type      string `json:"type"`
	Value     string `json:"value"`
	Color     string `json:"color,omitempty"`
	StorageID string `json:"storageId,omitempty"`
}

type ProjectInsuranceEvidence

type ProjectInsuranceEvidence struct {
	ProjectID            string `json:"projectId"`
	Enabled              bool   `json:"enabled"`
	BanInsuranceIncluded bool   `json:"banInsuranceIncluded"`
}

type ProjectObservationPolicy

type ProjectObservationPolicy struct {
	ProjectID string `json:"projectId"`
	ObservationValues
}

type ProjectSafeMode

type ProjectSafeMode struct {
	ProjectID         string           `json:"projectId"`
	Ceiling           SafeModeSettings `json:"ceiling"`
	Entitled          bool             `json:"entitled"`
	EntitlementReason *string          `json:"entitlementReason"`
}

type ProjectSignalCustodyUpdate

type ProjectSignalCustodyUpdate struct {
	ExpectedRevision  int64             `json:"expectedRevision"`
	SignalModeDefault SignalCustodyMode `json:"signalModeDefault"`
}

type ProjectTemplate

type ProjectTemplate struct {
	ID           string              `json:"id"`
	Name         string              `json:"name"`
	Category     string              `json:"category"`
	Language     string              `json:"language"`
	Status       string              `json:"status"`
	Kind         string              `json:"kind"`
	Definition   *TemplateDefinition `json:"definition,omitempty"`
	SampleValues map[string]string   `json:"sampleValues,omitempty"`
	CloudLinks   []json.RawMessage   `json:"cloudLinks"`
	CreatedAt    int64               `json:"createdAt"`
	UpdatedAt    int64               `json:"updatedAt"`
}

type ProjectTokenRecord

type ProjectTokenRecord struct {
	ID         string  `json:"id"`
	Start      string  `json:"start"`
	Last4      string  `json:"last4"`
	Label      *string `json:"label"`
	Scopes     int64   `json:"scopes"`
	ExpiresAt  *int64  `json:"expiresAt"`
	CreatedAt  int64   `json:"createdAt"`
	LastUsedAt *int64  `json:"lastUsedAt"`
	RevokedAt  *int64  `json:"revokedAt"`
}

type ProjectTokens

type ProjectTokens struct {
	// contains filtered or unexported fields
}

func (*ProjectTokens) List

type ProjectVoice

type ProjectVoice struct {
	// contains filtered or unexported fields
}

func (*ProjectVoice) Audio

func (v *ProjectVoice) Audio() *VoiceAudio

func (*ProjectVoice) ProviderCredentials

func (v *ProjectVoice) ProviderCredentials() *VoiceProviderCredentials

type ProjectWarmupPlan

type ProjectWarmupPlan struct {
	ProjectID         string             `json:"projectId"`
	Plan              WarmupPlanSettings `json:"plan"`
	Ceiling           int                `json:"ceiling"`
	Curve             []WarmupCurvePoint `json:"curve"`
	Entitled          bool               `json:"entitled"`
	EntitlementReason *string            `json:"entitlementReason"`
}

type ProjectWithStats

type ProjectWithStats struct {
	ID                string      `json:"_id"`
	CreationTime      int64       `json:"_creationTime"`
	TeamID            string      `json:"teamId"`
	Name              string      `json:"name"`
	Slug              string      `json:"slug"`
	Icon              ProjectIcon `json:"icon"`
	DefaultTier       string      `json:"defaultTier"`
	IsActive          bool        `json:"isActive"`
	Stage             string      `json:"stage"`
	ActiveConnections int64       `json:"activeConnections"`
	TotalConnections  int64       `json:"totalConnections"`
	TotalMessages     int64       `json:"totalMessages"`
	LastActivity      *int64      `json:"lastActivity"`
	IconURL           *string     `json:"iconUrl"`
}

type Projects

type Projects struct {
	// contains filtered or unexported fields
}

func (*Projects) ApproveProductionEnrollment

func (r *Projects) ApproveProductionEnrollment(ctx context.Context, id, op string, o ...RequestOptions) (Response[Envelope[ProductionEnrollmentCommandResult]], error)

func (*Projects) CancelProductionEnrollment

func (r *Projects) CancelProductionEnrollment(ctx context.Context, id, op string, o ...RequestOptions) (Response[Envelope[ProductionEnrollmentCommandResult]], error)

func (*Projects) Create

func (*Projects) GetHealthPolicy

func (r *Projects) GetHealthPolicy(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[ProjectHealthPolicy]], error)

func (*Projects) GetInsuranceEvidence

func (r *Projects) GetInsuranceEvidence(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[ProjectInsuranceEvidence]], error)

func (*Projects) GetSafeMode

func (r *Projects) GetSafeMode(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[ProjectSafeMode]], error)

func (*Projects) GetSignalCustody

func (r *Projects) GetSignalCustody(ctx context.Context, project string, o ...RequestOptions) (Response[Envelope[SignalCustodyDefault]], error)

func (*Projects) GetWarmupPlan

func (r *Projects) GetWarmupPlan(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[ProjectWarmupPlan]], error)

func (*Projects) List

func (*Projects) ListHybridMergeCandidates

func (r *Projects) ListHybridMergeCandidates(ctx context.Context, id string, o ...RequestOptions) (Response[Envelope[[]HybridMergeCandidate]], error)

func (*Projects) UpdateSignalCustody

type PromoteFunctionDeploymentRequest

type PromoteFunctionDeploymentRequest struct {
	DeploymentID     string `json:"deploymentId"`
	ExpectedRevision int64  `json:"expectedRevision"`
}

type PutAudienceProfileRequest

type PutAudienceProfileRequest struct {
	Tags             []string                            `json:"tags"`
	Attributes       map[string]AudienceProfileAttribute `json:"attributes"`
	ExpectedRevision *int64                              `json:"expectedRevision,omitempty"`
	Provenance       *AudienceProfileProvenance          `json:"provenance,omitempty"`
	Consent          *AudienceProfileConsentInput        `json:"consent,omitempty"`
}

type QRCode

type QRCode struct {
	QR    string `json:"qr,omitempty"`
	Event string `json:"event,omitempty"`
}
type QuickLink struct {
	Purpose        string  `json:"purpose"`
	ConnectionGoal string  `json:"connectionGoal"`
	AddMethod      string  `json:"addMethod,omitempty"`
	ID             string  `json:"id"`
	URL            string  `json:"url"`
	Connection     string  `json:"connection"`
	ExpiresAt      *string `json:"expiresAt"`
}

type QuickLinkAvailability

type QuickLinkAvailability struct {
	Allowed   bool    `json:"allowed"`
	AddMethod *string `json:"addMethod"`
	Methods   []struct {
		Kind    string `json:"kind"`
		Status  string `json:"status"`
		Enabled bool   `json:"enabled"`
	} `json:"methods"`
	ResumeQuickLinkID *string `json:"resumeQuickLinkId"`
}

type QuickLinkConfiguration

type QuickLinkConfiguration struct {
	ConnectionConfigurationOverrides
	Testing               *QuickLinkTesting     `json:"testing,omitempty"`
	ConnectionPreference  string                `json:"connectionPreference,omitempty"`
	ConnectionEnforcement string                `json:"connectionEnforcement,omitempty"`
	Methods               []string              `json:"methods,omitempty"`
	DefaultMethod         *string               `json:"defaultMethod,omitempty"`
	PrefillPhone          string                `json:"prefillPhone,omitempty"`
	AllowPhoneChange      *bool                 `json:"allowPhoneChange,omitempty"`
	HistorySync           *QuickLinkHistorySync `json:"historySync,omitempty"`
}

type QuickLinkHistorySync

type QuickLinkHistorySync struct {
	Delivery    *HistorySyncDeliveryPatch `json:"delivery,omitempty"`
	Consent     string                    `json:"consent,omitempty"`
	Mode        string                    `json:"mode,omitempty"`
	RequestFull *bool                     `json:"requestFull,omitempty"`
}

type QuickLinkOnboarding

type QuickLinkOnboarding struct {
	Stage           string          `json:"stage"`
	Connection      *string         `json:"connection"`
	Coexistence     *bool           `json:"coexistence"`
	ContactsSync    string          `json:"contactsSync"`
	HistorySync     string          `json:"historySync"`
	HistoryProgress float64         `json:"historyProgress"`
	Sync            CloudSyncStatus `json:"sync"`
	ErrorCode       *string         `json:"errorCode"`
}

type QuickLinkSettings

type QuickLinkSettings struct {
	ID                  string   `json:"id"`
	ProjectID           *string  `json:"projectId"`
	Enabled             bool     `json:"enabled"`
	SuccessCallbackURL  *string  `json:"successCallbackUrl"`
	FailureCallbackURL  *string  `json:"failureCallbackUrl"`
	BusinessName        *string  `json:"businessName"`
	Headline            *string  `json:"headline"`
	Description         *string  `json:"description"`
	SuccessMessage      *string  `json:"successMessage"`
	SupportURL          *string  `json:"supportUrl"`
	PrivacyURL          *string  `json:"privacyUrl"`
	TermsURL            *string  `json:"termsUrl"`
	Accent              *string  `json:"accent"`
	Theme               string   `json:"theme"`
	HideWatermark       bool     `json:"hideWatermark"`
	AllowPhoneChange    bool     `json:"allowPhoneChange"`
	Shape               *string  `json:"shape"`
	RadiusPx            *int     `json:"radiusPx"`
	LogoMode            string   `json:"logoMode"`
	LogoStorageID       *string  `json:"logoStorageId"`
	LogoSourceStorageID *string  `json:"logoSourceStorageId"`
	LogoURL             *string  `json:"logoUrl"`
	HistorySync         string   `json:"historySync"`
	Methods             []string `json:"methods"`
	DefaultMethod       *string  `json:"defaultMethod"`
	CreatedAt           int64    `json:"createdAt"`
	UpdatedAt           int64    `json:"updatedAt"`
}

type QuickLinkSettingsResource

type QuickLinkSettingsResource struct {
	// contains filtered or unexported fields
}

func (*QuickLinkSettingsResource) Retrieve

type QuickLinkStatus

type QuickLinkStatus struct {
	Purpose        string               `json:"purpose"`
	ConnectionGoal string               `json:"connectionGoal"`
	AddMethod      string               `json:"addMethod,omitempty"`
	HybridPhase    *string              `json:"hybridPhase"`
	Onboarding     *QuickLinkOnboarding `json:"onboarding,omitempty"`
	ID             string               `json:"id"`
	Status         string               `json:"status"`
	Connection     string               `json:"connection"`
	ExpiresAt      *string              `json:"expiresAt"`
	OpenedAt       *string              `json:"openedAt"`
	ConnectedAt    *string              `json:"connectedAt"`
	Phone          *string              `json:"phone"`
	ErrorCode      *string              `json:"errorCode"`
}

type QuickLinkTesting

type QuickLinkTesting struct {
	Country       string                `json:"country,omitempty"`
	Configuration *TestingConfiguration `json:"configuration,omitempty"`
	Editable      []string              `json:"editable,omitempty"`
}
type QuickLinks struct {
	// contains filtered or unexported fields
}

func (*QuickLinks) Availability

func (r *QuickLinks) Availability(ctx context.Context, projectID, connection string, o ...RequestOptions) (Response[Envelope[QuickLinkAvailability]], error)

func (*QuickLinks) Cancel

func (r *QuickLinks) Cancel(ctx context.Context, id string, o ...RequestOptions) (Response[Success], error)

func (*QuickLinks) Create

func (*QuickLinks) Retrieve

type QuickReplies

type QuickReplies struct {
	// contains filtered or unexported fields
}

func (*QuickReplies) Create

func (*QuickReplies) Delete

func (*QuickReplies) List

func (*QuickReplies) Replace

type QuickReply

type QuickReply struct {
	QuickReplyMutation
	ID string `json:"id"`
}

type QuickReplyCollection

type QuickReplyCollection struct {
	Policy        string               `json:"policy"`
	Status        string               `json:"status"`
	UnknownReason string               `json:"unknownReason,omitempty"`
	ObservedAt    string               `json:"observedAt,omitempty"`
	QuickReplies  []ObservedQuickReply `json:"quickReplies"`
}

type QuickReplyMutation

type QuickReplyMutation struct {
	Shortcut string   `json:"shortcut"`
	Message  string   `json:"message"`
	Keywords []string `json:"keywords,omitempty"`
	Count    *int     `json:"count,omitempty"`
}

type QuotedMessage

type QuotedMessage struct {
	ID   string `json:"id"`
	Type string `json:"type,omitempty"`
	Text string `json:"text,omitempty"`
}

type RawPageDecoder

type RawPageDecoder[T any] func(json.RawMessage, Metadata) (PageResult[T], error)

type RawPaginationOptions

type RawPaginationOptions struct{ CursorParameter string }

type RawRequest

type RawRequest struct {
	Method  string
	Path    string
	Query   url.Values
	Body    any
	Options RequestOptions
}

type RawRequester

type RawRequester interface {
	Raw(context.Context, RawRequest) (RawResponse, error)
}

RawRequester is implemented by team, project and Messaging clients. Every page uses Raw, preserving the client's credential and project boundary.

type RawResponse

type RawResponse = Response[json.RawMessage]

RawResponse is the explicit escape hatch for contracts not yet modeled.

type ReactionRequest

type ReactionRequest struct {
	Conversation ConversationReference `json:"conversation"`
	Transport    MessageTransport      `json:"transport,omitempty"`
	ID           string                `json:"id"`
	Reaction     string                `json:"reaction"`
}

type RecordCampaignConversionRequest

type RecordCampaignConversionRequest struct {
	ProjectID   string                             `json:"projectId"`
	RecipientID string                             `json:"recipientId"`
	EventID     string                             `json:"eventId"`
	EventType   string                             `json:"eventType"`
	OccurredAt  string                             `json:"occurredAt"`
	Value       *Nullable[CampaignConversionValue] `json:"value,omitempty"`
}

type RegisterFlowEncryptionKeyRequest

type RegisterFlowEncryptionKeyRequest struct{ BusinessPublicKey string }

type RejectCallRequest

type RejectCallRequest struct {
	Participant string `json:"participant,omitempty"`
}

type ReorderBillingPrioritiesRequest

type ReorderBillingPrioritiesRequest struct {
	Scope            string                    `json:"scope"`
	ProjectID        string                    `json:"projectId,omitempty"`
	ResourceIDs      *[]string                 `json:"resourceIds,omitempty"`
	Resources        *[]BillingReorderResource `json:"resources,omitempty"`
	ExpectedRevision int64                     `json:"expectedRevision"`
}

type ReplaceChatLabelsRequest

type ReplaceChatLabelsRequest struct {
	Labels []string `json:"labels"`
}

type ReplayEventRequest

type ReplayEventRequest struct {
	WebhookID string `json:"webhookId"`
}

type ReplyChoice

type ReplyChoice struct {
	Kind string `json:"kind"`
	ID   string `json:"id"`
}

type ReportBanSafeIncidentRequest

type ReportBanSafeIncidentRequest struct {
	Connection string `json:"connection"`
	OccurredAt string `json:"occurredAt,omitempty"`
	Note       string `json:"note,omitempty"`
}

type RequestLog

type RequestLog struct {
	ID         string                `json:"id"`
	ProjectID  string                `json:"projectId"`
	CreatedAt  string                `json:"createdAt"`
	Method     string                `json:"method"`
	Route      string                `json:"route"`
	Status     *int                  `json:"status"`
	DurationMs *float64              `json:"durationMs"`
	Result     RequestLogResult      `json:"result"`
	Source     RequestLogSource      `json:"source"`
	RequestID  *string               `json:"requestId"`
	TraceID    *string               `json:"traceId"`
	ErrorCode  *string               `json:"errorCode"`
	MCPTool    *string               `json:"mcpTool"`
	Credential *RequestLogCredential `json:"credential"`
}

type RequestLogCredential

type RequestLogCredential struct {
	Type  RequestLogCredentialType `json:"type"`
	ID    *string                  `json:"id"`
	Last4 *string                  `json:"last4"`
}

type RequestLogCredentialType

type RequestLogCredentialType string

type RequestLogFilters

type RequestLogFilters struct {
	Status                           []RequestLogStatus
	Method                           []RequestLogMethod
	Route                            *string
	Source                           RequestLogSource
	CredentialID, RequestID, TraceID *string
	Since, Until                     *string
	SinceTime, UntilTime             *time.Time
}

type RequestLogMethod

type RequestLogMethod string

type RequestLogPage

type RequestLogPage struct {
	Items        []RequestLog
	HasMore      bool
	NextCursor   *string
	FollowCursor string
	Metadata     Metadata
}

type RequestLogResult

type RequestLogResult string
const (
	RequestLogSuccess RequestLogResult = "success"
	RequestLogFailure RequestLogResult = "failure"
)

type RequestLogSource

type RequestLogSource string

type RequestLogStatus

type RequestLogStatus string

func RequestLogStatusCode

func RequestLogStatusCode(status int) RequestLogStatus

type RequestLogs

type RequestLogs struct {
	// contains filtered or unexported fields
}

func (*RequestLogs) Follow

func (*RequestLogs) List

func (*RequestLogs) Tail

Tail yields chronologically, follows without delay while pages remain, and stops gracefully on cancellation or loop exit.

type RequestOptions

type RequestOptions struct {
	APIVersion        string
	Headers           http.Header
	IdempotencyKey    string
	MaxNetworkRetries *int
	Timeout           time.Duration
}

type RequeueCampaignRequest

type RequeueCampaignRequest struct {
	IncludeSkippedError *bool `json:"includeSkippedError,omitempty"`
}

type RescheduleCampaignRequest

type RescheduleCampaignRequest struct {
	ScheduledAt *int64 `json:"scheduledAt"`
}

type ReschedulePlatformCampaignRequest

type ReschedulePlatformCampaignRequest struct {
	ProjectID   string `json:"projectId"`
	ScheduledAt *int64 `json:"scheduledAt"`
}

type ResolvedIdentity

type ResolvedIdentity struct {
	ConversationReference
	KeyRequired *bool `json:"keyRequired,omitempty"`
}

type ResourceBillingControls

type ResourceBillingControls struct {
	Budget           BillingLimit `json:"budget"`
	Priority         int          `json:"priority"`
	PriorityRevision int64        `json:"priorityRevision"`
}

type Response

type Response[T any] struct {
	Data     T
	Metadata Metadata
}

type RetrieveCallRecordParams

type RetrieveCallRecordParams struct{ ProjectID string }

type RetrieveOperationParams

type RetrieveOperationParams struct {
	Wait          int
	AfterSequence *int64
	ProjectID     string
}

type RotateWebhookSecretRequest

type RotateWebhookSecretRequest struct {
	OverlapSeconds *int `json:"overlapSeconds,omitempty"`
}

type RuntimeConnectionStatusPayload

type RuntimeConnectionStatusPayload struct {
	Status       string `json:"status"`
	StatusReason string `json:"statusReason,omitempty"`
	BanCode      *int   `json:"banCode,omitempty"`
	BanReason    string `json:"banReason,omitempty"`
	BanExpiresAt *int64 `json:"banExpiresAt,omitempty"`
	Detail       string `json:"detail,omitempty"`
	// contains filtered or unexported fields
}

type RuntimeTemplateStatusPayload

type RuntimeTemplateStatusPayload struct {
	TemplateName  string `json:"templateName"`
	TemplateID    string `json:"templateId"`
	Status        string `json:"status"`
	Category      string `json:"category"`
	Reason        string `json:"reason"`
	QualityRating string `json:"qualityRating"`
	// contains filtered or unexported fields
}

type S3ArchiveOptions

type S3ArchiveOptions struct {
	Key, ScratchDirectory string
	Metadata              map[string]string
	WhatsAppMediaDownloadOptions
}

type S3ArchiveResult

type S3ArchiveResult struct {
	Bucket, Key    string
	Bytes          int64
	MimeType, ETag string
}

type S3MediaClient

type S3MediaClient interface {
	HeadObject(context.Context, *s3.HeadObjectInput, ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
	GetObject(context.Context, *s3.GetObjectInput, ...func(*s3.Options)) (*s3.GetObjectOutput, error)
	PutObject(context.Context, *s3.PutObjectInput, ...func(*s3.Options)) (*s3.PutObjectOutput, error)
}

S3MediaClient is the official AWS SDK v2 boundary, also implemented by a caller-configured client for an S3-compatible customer bucket.

type S3MediaStore

type S3MediaStore struct {
	// contains filtered or unexported fields
}

func NewS3MediaStore

func NewS3MediaStore(options S3MediaStoreOptions) (*S3MediaStore, error)

func (*S3MediaStore) Archive

Archive verifies into a private spool before issuing any object PUT, so corrupt incoming media cannot replace a previously valid object.

func (*S3MediaStore) GoString

func (s *S3MediaStore) GoString() string

func (*S3MediaStore) String

func (*S3MediaStore) String() string

func (*S3MediaStore) UploadToWhatsApp

UploadToWhatsApp performs two ETag-pinned object reads. The encryption repeat pass verifies EOF/hash before releasing its last bytes to the media provider.

type S3MediaStoreOptions

type S3MediaStoreOptions struct {
	Client         S3MediaClient
	Bucket, Prefix string
}

type S3UploadToWhatsAppOptions

type S3UploadToWhatsAppOptions struct {
	Messaging       *WhatsAppMediaResource
	Connection, Key string
	UploadWhatsAppMediaOptions
}

type SIPEndpoint

type SIPEndpoint struct {
	Status     string                 `json:"status"`
	Host       *string                `json:"host"`
	Transports []SIPEndpointTransport `json:"transports"`
	RTP        *SIPEndpointRTP        `json:"rtp"`
}

type SIPEndpointRTP

type SIPEndpointRTP struct {
	Protocol string `json:"protocol"`
	PortMin  int    `json:"portMin"`
	PortMax  int    `json:"portMax"`
}

type SIPEndpointTransport

type SIPEndpointTransport struct {
	Transport string `json:"transport"`
	Port      int    `json:"port"`
	SRTP      string `json:"srtp"`
}

type SIPInboundInput

type SIPInboundInput struct {
	Connection          *Nullable[string] `json:"connection,omitempty"`
	AllowedAddresses    []string          `json:"allowedAddresses"`
	AllowedDestinations *[]string         `json:"allowedDestinations,omitempty"`
}

type SIPInboundPatch

type SIPInboundPatch struct {
	Connection          *Nullable[string] `json:"connection,omitempty"`
	AllowedAddresses    *[]string         `json:"allowedAddresses,omitempty"`
	AllowedDestinations *[]string         `json:"allowedDestinations,omitempty"`
}

type SIPOutboundInput

type SIPOutboundInput struct {
	TargetURI    string            `json:"targetUri"`
	Transport    string            `json:"transport,omitempty"`
	AuthUsername *Nullable[string] `json:"authUsername,omitempty"`
	AuthPassword string            `json:"authPassword,omitempty"`
	FromUser     *Nullable[string] `json:"fromUser,omitempty"`
}

func (SIPOutboundInput) GoString

func (c SIPOutboundInput) GoString() string

func (SIPOutboundInput) String

func (c SIPOutboundInput) String() string

type SIPOutboundPatch

type SIPOutboundPatch struct {
	TargetURI    *string           `json:"targetUri,omitempty"`
	Transport    *string           `json:"transport,omitempty"`
	AuthUsername *Nullable[string] `json:"authUsername,omitempty"`
	AuthPassword *string           `json:"authPassword,omitempty"`
	FromUser     *Nullable[string] `json:"fromUser,omitempty"`
}

func (SIPOutboundPatch) GoString

func (c SIPOutboundPatch) GoString() string

func (SIPOutboundPatch) String

func (c SIPOutboundPatch) String() string

type SIPTrunk

type SIPTrunk struct {
	ID                 string            `json:"id"`
	ProjectID          string            `json:"projectId"`
	Name               string            `json:"name"`
	Enabled            bool              `json:"enabled"`
	Direction          string            `json:"direction"`
	Outbound           *SIPTrunkOutbound `json:"outbound"`
	Inbound            *SIPTrunkInbound  `json:"inbound"`
	Codecs             []string          `json:"codecs"`
	MaxConcurrentCalls int               `json:"maxConcurrentCalls"`
	Revision           int64             `json:"revision"`
	CreatedAt          string            `json:"createdAt"`
	UpdatedAt          string            `json:"updatedAt"`
}

type SIPTrunkCreated

type SIPTrunkCreated struct {
	Trunk              SIPTrunk             `json:"trunk"`
	InboundCredentials *SIPTrunkCredentials `json:"inboundCredentials,omitempty"`
}

type SIPTrunkCredentials

type SIPTrunkCredentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Realm    string `json:"realm"`
}

func (SIPTrunkCredentials) GoString

func (c SIPTrunkCredentials) GoString() string

func (SIPTrunkCredentials) String

func (c SIPTrunkCredentials) String() string

type SIPTrunkDeleted

type SIPTrunkDeleted struct {
	ID      string `json:"id"`
	Deleted bool   `json:"deleted"`
}

type SIPTrunkInbound

type SIPTrunkInbound struct {
	Username            string   `json:"username"`
	Realm               string   `json:"realm"`
	Connection          *string  `json:"connection"`
	AllowedAddresses    []string `json:"allowedAddresses"`
	AllowedDestinations []string `json:"allowedDestinations"`
}

type SIPTrunkOutbound

type SIPTrunkOutbound struct {
	TargetURI    string  `json:"targetUri"`
	Transport    string  `json:"transport"`
	AuthUsername *string `json:"authUsername"`
	HasPassword  bool    `json:"hasPassword"`
	FromUser     *string `json:"fromUser"`
}

type SIPTrunks

type SIPTrunks struct {
	// contains filtered or unexported fields
}

func (*SIPTrunks) Create

func (*SIPTrunks) Delete

func (*SIPTrunks) Endpoint

func (r *SIPTrunks) Endpoint(ctx context.Context, o ...RequestOptions) (Response[SIPEndpoint], error)

func (*SIPTrunks) List

func (r *SIPTrunks) List(ctx context.Context, o ...RequestOptions) (Response[[]SIPTrunk], error)

func (*SIPTrunks) Retrieve

func (r *SIPTrunks) Retrieve(ctx context.Context, id string, o ...RequestOptions) (Response[SIPTrunk], error)

func (*SIPTrunks) RotateCredentials

func (r *SIPTrunks) RotateCredentials(ctx context.Context, id string, o ...RequestOptions) (Response[SIPTrunkCredentials], error)

func (*SIPTrunks) Update

type SafeModeApplied

type SafeModeApplied struct {
	ObservedAt string  `json:"observedAt"`
	Presence   *string `json:"presence"`
	Typing     *string `json:"typing"`
	Reads      *string `json:"reads"`
	Pacing     *string `json:"pacing"`
}

type SafeModeOverride

type SafeModeOverride struct {
	Presence string `json:"presence"`
	Typing   string `json:"typing"`
	Reads    string `json:"reads"`
	Pacing   string `json:"pacing"`
}

type SafeModeSettings

type SafeModeSettings struct {
	Presence    string `json:"presence"`
	Typing      string `json:"typing"`
	Reads       string `json:"reads"`
	Pacing      string `json:"pacing"`
	OnlineStart int    `json:"onlineStart"`
	OnlineEnd   int    `json:"onlineEnd"`
}

type SavedAudienceSegmentPreview

type SavedAudienceSegmentPreview struct {
	AudienceSegmentPreview
	Revision int `json:"revision"`
}

type SecurityIncident

type SecurityIncident struct {
	ID             string  `json:"id"`
	KeyID          string  `json:"keyId"`
	TokenType      string  `json:"tokenType"`
	Source         string  `json:"source"`
	URL            *string `json:"url"`
	Ref            *string `json:"ref"`
	Resolution     string  `json:"resolution"`
	DetectedAt     int64   `json:"detectedAt"`
	AcknowledgedAt *int64  `json:"acknowledgedAt"`
	AcknowledgedBy *string `json:"acknowledgedBy"`
	CreatedAt      int64   `json:"createdAt"`
}

type SecurityIncidentAcknowledgement

type SecurityIncidentAcknowledgement struct {
	Acknowledged bool `json:"acknowledged"`
}

type SecurityIncidents

type SecurityIncidents struct {
	// contains filtered or unexported fields
}

func (*SecurityIncidents) Acknowledge

func (*SecurityIncidents) List

type SeenRequest

type SeenRequest struct {
	Conversation ConversationReference `json:"conversation"`
	ID           string                `json:"id"`
}

type SendMessageRequest

type SendMessageRequest struct {
	Transport     MessageTransport      `json:"transport,omitempty"`
	Conversation  ConversationReference `json:"conversation"`
	IsForwarded   *bool                 `json:"isForwarded,omitempty"`
	Mentions      []string              `json:"mentions,omitempty"`
	QuotedMessage *QuotedMessage        `json:"quotedMessage,omitempty"`
	Content       MessageContent        `json:"content"`
}

type SendTestingPhoneMessageRequest

type SendTestingPhoneMessageRequest struct {
	To   string `json:"to"`
	Text string `json:"text"`
}

type SendTestingPhoneMessageResult

type SendTestingPhoneMessageResult struct {
	Connection string  `json:"connection"`
	To         string  `json:"to"`
	MessageID  *string `json:"messageId"`
}

type SetBillingLimitRequest

type SetBillingLimitRequest struct {
	LimitCredits     *float64 `json:"limitCredits"`
	ExpectedRevision int64    `json:"expectedRevision"`
}

type SetBillingPriorityRequest

type SetBillingPriorityRequest struct {
	Priority         int   `json:"priority"`
	ExpectedRevision int64 `json:"expectedRevision"`
}

type SetCampaignReplyFlowRequest

type SetCampaignReplyFlowRequest struct {
	ReplyFlowID Nullable[string] `json:"replyFlowId"`
}

ReplyFlowID is required. Its zero Nullable value explicitly detaches a flow.

type SetClientRulesRequest

type SetClientRulesRequest struct {
	RecipientMode          string  `json:"recipientMode,omitempty"`
	AllowedActions         string  `json:"allowedActions,omitempty"`
	RateLimit              *int    `json:"rateLimit,omitempty"`
	MaxDaily               *int    `json:"maxDaily,omitempty"`
	AllowedOrigins         *string `json:"allowedOrigins,omitempty"`
	ConversationTTLSeconds *int    `json:"conversationTtlSeconds,omitempty"`
	MaxConcurrency         *int    `json:"maxConcurrency,omitempty"`
	MaxSetupsPerMinute     *int    `json:"maxSetupsPerMinute,omitempty"`
	AllowedNumber          *string `json:"allowedNumber,omitempty"`
}

type SetFlowEndpointRequest

type SetFlowEndpointRequest struct {
	ConnectionID        string            `json:"connectionId"`
	Enabled             *bool             `json:"enabled,omitempty"`
	ExpectedRevision    *int64            `json:"expectedRevision,omitempty"`
	Mode                string            `json:"mode"`
	URL                 string            `json:"url,omitempty"`
	RotateSigningSecret *bool             `json:"rotateSigningSecret,omitempty"`
	FunctionID          string            `json:"functionId,omitempty"`
	DeploymentID        *Nullable[string] `json:"deploymentId,omitempty"`
}

type SetHybridPausedRequest

type SetHybridPausedRequest struct {
	ExpectedRevision string `json:"expectedRevision"`
	Paused           bool   `json:"paused"`
}

type SetHybridRoutingPolicyRequest

type SetHybridRoutingPolicyRequest struct {
	ExpectedRevision  string   `json:"expectedRevision"`
	Prefer            *string  `json:"prefer"`
	AllowedTransports []string `json:"allowedTransports"`
}

type SetPlatformCampaignReplyFlowRequest

type SetPlatformCampaignReplyFlowRequest struct {
	SetCampaignReplyFlowRequest
	ProjectID string `json:"projectId"`
}

type SetResourceBillingControlsRequest

type SetResourceBillingControlsRequest struct {
	LimitCredits             *float64 `json:"limitCredits"`
	Priority                 int      `json:"priority"`
	ExpectedBudgetRevision   int64    `json:"expectedBudgetRevision"`
	ExpectedPriorityRevision int64    `json:"expectedPriorityRevision"`
}

type SignalConnection

type SignalConnection struct {
	ID              string  `json:"id"`
	LeaseGeneration uint64  `json:"lease_generation"`
	Claimed         bool    `json:"claimed"`
	HasDeviceKeys   bool    `json:"has_device_keys"`
	State           string  `json:"state"`
	PN              *string `json:"pn"`
	LID             *string `json:"lid"`
}

func (SignalConnection) GoString

func (v SignalConnection) GoString() string

func (SignalConnection) MarshalJSON

func (SignalConnection) MarshalJSON() ([]byte, error)

func (SignalConnection) String

func (SignalConnection) String() string

type SignalConnections

type SignalConnections struct {
	NodeID      string             `json:"node_id"`
	Connections []SignalConnection `json:"connections"`
}

func (SignalConnections) GoString

func (v SignalConnections) GoString() string

func (SignalConnections) MarshalJSON

func (SignalConnections) MarshalJSON() ([]byte, error)

func (SignalConnections) String

func (SignalConnections) String() string

type SignalCustodyDefault

type SignalCustodyDefault struct {
	SignalModeDefault   *SignalCustodyMode `json:"signalModeDefault"`
	EffectiveSignalMode SignalCustodyMode  `json:"effectiveSignalMode"`
	Revision            int64              `json:"revision"`
}

type SignalCustodyMode

type SignalCustodyMode string
const (
	SignalCustodyStandard      SignalCustodyMode = "standard"
	SignalCustodyZeroKnowledge SignalCustodyMode = "zero_knowledge"
)

type SignalCustodyResource

type SignalCustodyResource struct {
	// contains filtered or unexported fields
}

SignalCustodyResource controls future reservation defaults, never existing Connections.

func (*SignalCustodyResource) Retrieve

func (*SignalCustodyResource) RetrieveCustomer

func (*SignalCustodyResource) UpdateCustomer

type SignalEvent

type SignalEvent struct {
	ID              string                   `json:"id"`
	Type            string                   `json:"type"`
	ConnectionID    string                   `json:"connection_id"`
	Chat            string                   `json:"chat"`
	Sender          string                   `json:"sender"`
	SenderAlt       *string                  `json:"sender_alt,omitempty"`
	MessageID       string                   `json:"message_id"`
	Timestamp       int64                    `json:"timestamp"`
	IsFromMe        bool                     `json:"is_from_me"`
	Redelivered     bool                     `json:"redelivered"`
	IdentityChanged bool                     `json:"identity_changed"`
	MessageProto    []byte                   `json:"message_proto"`
	Text            *string                  `json:"text,omitempty"`
	Media           *SignalMediaDescriptor   `json:"media,omitempty"`
	History         *SignalHistoryDescriptor `json:"history,omitempty"`
	RawJSON         json.RawMessage          `json:"-"`
}

func ProcessSignalWebhook

func ProcessSignalWebhook(ctx context.Context, raw []byte, headers http.Header, secret string, options SignalWebhookOptions, store SignalWebhookStore) (SignalEvent, bool, error)

ProcessSignalWebhook returns only after the caller's atomic durable dedup and effects commit. An HTTP handler may return 2xx after success. No fallback store is supplied and this helper never acknowledges an SSE event.

func VerifySignalWebhook

func VerifySignalWebhook(raw []byte, headers http.Header, secret string, options SignalWebhookOptions) (SignalEvent, error)

func (SignalEvent) GoString

func (v SignalEvent) GoString() string

func (SignalEvent) MarshalJSON

func (SignalEvent) MarshalJSON() ([]byte, error)

func (SignalEvent) String

func (SignalEvent) String() string

type SignalEventStream

type SignalEventStream struct {
	// contains filtered or unexported fields
}

SignalEventStream reads one connection. There is no resume cursor, automatic reconnect or automatic ACK in the pinned sidecar service contract.

func (*SignalEventStream) Close

func (s *SignalEventStream) Close() error

func (*SignalEventStream) GoString

func (s *SignalEventStream) GoString() string

func (*SignalEventStream) Items

func (*SignalEventStream) MarshalJSON

func (*SignalEventStream) MarshalJSON() ([]byte, error)

func (*SignalEventStream) String

func (*SignalEventStream) String() string

type SignalHistoryDescriptor

type SignalHistoryDescriptor struct {
	NotificationProto        []byte  `json:"notification_proto"`
	DirectPath               *string `json:"direct_path"`
	MediaKey                 []byte  `json:"media_key"`
	FileSHA256               []byte  `json:"file_sha256"`
	FileEncSHA256            []byte  `json:"file_enc_sha256"`
	OriginalMessageID        *string `json:"original_message_id"`
	PeerDataRequestSessionID *string `json:"peer_data_request_session_id"`
	InlinePayload            []byte  `json:"inline_payload"`
	SyncType                 *int64  `json:"sync_type"`
	ChunkOrder               *int64  `json:"chunk_order"`
	Progress                 *int64  `json:"progress"`
	FileLength               *uint64 `json:"file_length"`
}

func (SignalHistoryDescriptor) GoString

func (v SignalHistoryDescriptor) GoString() string

func (SignalHistoryDescriptor) MarshalJSON

func (SignalHistoryDescriptor) MarshalJSON() ([]byte, error)

func (SignalHistoryDescriptor) String

type SignalMediaDescriptor

type SignalMediaDescriptor struct {
	Kind              string  `json:"kind"`
	DirectPath        string  `json:"direct_path"`
	URL               string  `json:"url,omitempty"`
	MediaKey          []byte  `json:"media_key"`
	FileSHA256        []byte  `json:"file_sha256"`
	FileEncSHA256     []byte  `json:"file_enc_sha256"`
	FileLength        uint64  `json:"file_length"`
	MimeType          string  `json:"mimetype"`
	Caption           *string `json:"caption,omitempty"`
	FileName          *string `json:"file_name,omitempty"`
	Width             *uint32 `json:"width,omitempty"`
	Height            *uint32 `json:"height,omitempty"`
	Seconds           *uint32 `json:"seconds,omitempty"`
	MediaKeyTimestamp *int64  `json:"media_key_timestamp,omitempty"`
	PTT               *bool   `json:"ptt,omitempty"`
}

func ToSignalMediaDescriptor

func ToSignalMediaDescriptor(upload WhatsAppMediaUploadResult) (SignalMediaDescriptor, error)

ToSignalMediaDescriptor keeps attachment keys on the customer's service path.

func (SignalMediaDescriptor) GoString

func (v SignalMediaDescriptor) GoString() string

func (SignalMediaDescriptor) MarshalJSON

func (SignalMediaDescriptor) MarshalJSON() ([]byte, error)

func (SignalMediaDescriptor) String

func (SignalMediaDescriptor) String() string

type SignalSendOutcome

type SignalSendOutcome struct {
	MessageID       string `json:"message_id"`
	ServerTimestamp int64  `json:"server_timestamp"`
	Resent          bool   `json:"resent"`
}

type SignalSendRequest

type SignalSendRequest struct {
	To    string
	Text  *string
	Media *SignalMediaDescriptor
}

func (SignalSendRequest) GoString

func (v SignalSendRequest) GoString() string

func (SignalSendRequest) MarshalJSON

func (SignalSendRequest) MarshalJSON() ([]byte, error)

func (SignalSendRequest) String

func (SignalSendRequest) String() string

type SignalSidecarClient

type SignalSidecarClient struct {
	// contains filtered or unexported fields
}

func NewSignalSidecarClient

func NewSignalSidecarClient(options SignalSidecarOptions) (*SignalSidecarClient, error)

func (*SignalSidecarClient) Acknowledge

func (c *SignalSidecarClient) Acknowledge(ctx context.Context, eventID string) error

Acknowledge is manual. Call after durable application processing. Cancellation or timeout does not undo an ACK or send that the service already accepted.

func (*SignalSidecarClient) Connections

func (*SignalSidecarClient) GoString

func (v *SignalSidecarClient) GoString() string

func (*SignalSidecarClient) Health

func (c *SignalSidecarClient) Health(ctx context.Context) error

func (*SignalSidecarClient) MarshalJSON

func (*SignalSidecarClient) MarshalJSON() ([]byte, error)

func (*SignalSidecarClient) OpenEvents

func (c *SignalSidecarClient) OpenEvents(ctx context.Context, connectionID string) (*SignalEventStream, error)

func (*SignalSidecarClient) Send

func (*SignalSidecarClient) String

func (*SignalSidecarClient) String() string

type SignalSidecarOptions

type SignalSidecarOptions struct {
	URL        string
	Secret     string
	HTTPClient *http.Client
	Timeout    time.Duration
}

func (SignalSidecarOptions) GoString

func (v SignalSidecarOptions) GoString() string

func (SignalSidecarOptions) MarshalJSON

func (SignalSidecarOptions) MarshalJSON() ([]byte, error)

func (SignalSidecarOptions) String

func (SignalSidecarOptions) String() string

type SignalWebhookOptions

type SignalWebhookOptions struct {
	Tolerance *time.Duration
	Now       time.Time
}

type SignalWebhookStore

type SignalWebhookStore interface {
	ApplyOnce(context.Context, SignalEvent) (bool, error)
}

SignalWebhookStore atomically deduplicates and durably applies the event. true means newly applied; false means previously applied. No in-memory fallback.

type StarRequest

type StarRequest struct {
	Conversation ConversationReference `json:"conversation"`
	ID           string                `json:"id"`
	Star         bool                  `json:"star"`
}

type StatusResponse

type StatusResponse struct {
	Status      string `json:"status"`
	Uptime      string `json:"uptime"`
	Version     string `json:"version"`
	Environment string `json:"env"`
}

type StatusResult

type StatusResult struct {
	Status string `json:"status"`
}

type StickerContent

type StickerContent struct {
	Descriptor *WhatsAppMediaSendDescriptor `json:"-"`
}

type StopConfirmationCounts

type StopConfirmationCounts struct {
	Queued    int64 `json:"queued"`
	Admitted  int64 `json:"admitted"`
	Completed int64 `json:"completed"`
	Failed    int64 `json:"failed"`
	Unknown   int64 `json:"unknown"`
}

type StopConfirmationLocale

type StopConfirmationLocale string
const (
	StopConfirmationEnglish    StopConfirmationLocale = "en"
	StopConfirmationPortuguese StopConfirmationLocale = "pt-BR"
	StopConfirmationSpanish    StopConfirmationLocale = "es"
)

type StopConfirmationSettings

type StopConfirmationSettings struct {
	TeamID          string                  `json:"teamId"`
	Enabled         bool                    `json:"enabled"`
	Locale          *StopConfirmationLocale `json:"locale"`
	Revision        int64                   `json:"revision"`
	TextRevision    int                     `json:"textRevision"`
	Acknowledgement *string                 `json:"acknowledgement"`
	UpdatedAt       *int64                  `json:"updatedAt"`
}

type StopConfirmationSummary

type StopConfirmationSummary struct {
	Enabled bool                   `json:"enabled"`
	Counts  StopConfirmationCounts `json:"counts"`
}

type SubmitPasskeyAssertionRequest

type SubmitPasskeyAssertionRequest struct {
	TicketID  string           `json:"ticketId"`
	Assertion PasskeyAssertion `json:"assertion"`
}

type SubmitProjectTemplateRequest

type SubmitProjectTemplateRequest struct {
	Connection string `json:"connection"`
}

type Success

type Success struct {
	Success bool   `json:"success"`
	Message string `json:"message,omitempty"`
}

type SynthesizeVoiceAudioRequest

type SynthesizeVoiceAudioRequest struct {
	Name          string `json:"name"`
	Text          string `json:"text"`
	CredentialID  string `json:"credentialId,omitempty"`
	RetentionDays *int   `json:"retentionDays,omitempty"`
	Provider      string `json:"provider"`
	VoiceID       string `json:"voiceId"`
	Model         string `json:"model,omitempty"`
}

func (SynthesizeVoiceAudioRequest) GoString

func (v SynthesizeVoiceAudioRequest) GoString() string

func (SynthesizeVoiceAudioRequest) String

type SystemClient

type SystemClient struct {
	// contains filtered or unexported fields
}

func NewSystemClient

func NewSystemClient(c Config) (*SystemClient, error)

NewSystemClient creates credential-free health and version probes. Any supplied credential is discarded and is never sent to the service.

func (*SystemClient) Health

func (*SystemClient) Ping

func (*SystemClient) Status

func (*SystemClient) Version

type TailRequestLogsParams

type TailRequestLogsParams struct {
	RequestLogFilters
	ProjectID string
	Interval  time.Duration
	Backfill  int
}

type Team

type Team struct {
	ID                       string  `json:"id"`
	ExternalID               string  `json:"externalId"`
	Name                     string  `json:"name"`
	Slug                     *string `json:"slug"`
	Email                    string  `json:"email"`
	Timezone                 *string `json:"timezone"`
	CreditBalanceCents       float64 `json:"creditBalanceCents"`
	LowBalanceThresholdCents float64 `json:"lowBalanceThresholdCents"`
	BillingEmail             string  `json:"billingEmail"`
	Status                   string  `json:"status"`
	Plan                     string  `json:"plan"`
	PlanStatus               string  `json:"planStatus"`
	IsActive                 bool    `json:"isActive"`
	CreatedAt                int64   `json:"createdAt"`
	UpdatedAt                int64   `json:"updatedAt"`
}

type TeamClient

type TeamClient struct {
	// contains filtered or unexported fields
}

TeamClient owns the team control plane. Project creates a separate, immutable view using the same configuration and HTTP transport.

func NewTeamClient

func NewTeamClient(c Config) (*TeamClient, error)

func (*TeamClient) APIKeys

func (c *TeamClient) APIKeys() *APIKeys

func (*TeamClient) Analytics

func (c *TeamClient) Analytics() *Analytics

func (*TeamClient) AudienceProfiles

func (c *TeamClient) AudienceProfiles() *AudienceProfiles

func (*TeamClient) AudienceSegments

func (c *TeamClient) AudienceSegments() *AudienceSegments

func (*TeamClient) Audiences

func (c *TeamClient) Audiences() *Audiences

func (*TeamClient) AuditLogs

func (c *TeamClient) AuditLogs() *AuditLogs

func (*TeamClient) BanSafe

func (c *TeamClient) BanSafe() *BanSafe

func (*TeamClient) Billing

func (c *TeamClient) Billing() *Billing

func (*TeamClient) CallOptOuts

func (c *TeamClient) CallOptOuts() *CallOptOuts

func (*TeamClient) CallPolicy

func (c *TeamClient) CallPolicy() *CallPolicyResource

func (*TeamClient) CallRetention

func (c *TeamClient) CallRetention() *CallRetentionResource

func (*TeamClient) Calls

func (c *TeamClient) Calls() *PlatformCalls

func (*TeamClient) Campaigns

func (c *TeamClient) Campaigns() *Campaigns

func (*TeamClient) ConnectionBans

func (c *TeamClient) ConnectionBans() *ConnectionBans

func (*TeamClient) ConnectionConfiguration

func (c *TeamClient) ConnectionConfiguration() *ConnectionConfigurationResource

func (*TeamClient) Connections

func (c *TeamClient) Connections() *PlatformConnections

func (*TeamClient) Customers

func (c *TeamClient) Customers() *Customers

func (*TeamClient) Events

func (c *TeamClient) Events() *Events

func (*TeamClient) Media

func (c *TeamClient) Media() *PlatformMedia

func (*TeamClient) Members

func (c *TeamClient) Members() *Members

func (*TeamClient) Operations

func (c *TeamClient) Operations() *Operations

func (*TeamClient) OptOuts

func (c *TeamClient) OptOuts() *OptOuts

func (*TeamClient) Project

func (c *TeamClient) Project(id string) (*ProjectClient, error)

func (*TeamClient) ProjectTokens

func (c *TeamClient) ProjectTokens() *ProjectTokens

func (*TeamClient) Projects

func (c *TeamClient) Projects() *Projects

func (*TeamClient) QuickLinkSettings

func (c *TeamClient) QuickLinkSettings() *QuickLinkSettingsResource

func (*TeamClient) Raw

func (*TeamClient) RequestLogs

func (c *TeamClient) RequestLogs() *RequestLogs

func (*TeamClient) SIPTrunks

func (c *TeamClient) SIPTrunks() *TeamSIPTrunks

func (*TeamClient) SecurityIncidents

func (c *TeamClient) SecurityIncidents() *SecurityIncidents

func (*TeamClient) Teams

func (c *TeamClient) Teams() *Teams

func (*TeamClient) Usage

func (c *TeamClient) Usage() *Usage

func (*TeamClient) Voice

func (c *TeamClient) Voice() *TeamVoice

func (*TeamClient) WebhookDeliveries

func (c *TeamClient) WebhookDeliveries() *WebhookDeliveries

func (*TeamClient) Webhooks

func (c *TeamClient) Webhooks() *Webhooks

type TeamMember

type TeamMember struct {
	ID           string  `json:"_id"`
	CreationTime float64 `json:"_creationTime"`
	TeamID       string  `json:"teamId"`
	UserID       string  `json:"userId"`
	Email        string  `json:"email"`
	Name         *string `json:"name"`
	Role         string  `json:"role"`
	Status       string  `json:"status"`
	InvitedAt    *int64  `json:"invitedAt"`
	JoinedAt     *int64  `json:"joinedAt"`
}

type TeamSIPTrunks

type TeamSIPTrunks struct{ *SIPTrunks }

func (*TeamSIPTrunks) Create

func (*TeamSIPTrunks) List

func (r *TeamSIPTrunks) List(ctx context.Context, projectID string, o ...RequestOptions) (Response[[]SIPTrunk], error)

type TeamVoice

type TeamVoice struct {
	// contains filtered or unexported fields
}

func (*TeamVoice) Audio

func (v *TeamVoice) Audio(projectID string) *VoiceAudio

Audio creates a project-specific audio view from a team client.

func (*TeamVoice) ProviderCredentials

func (v *TeamVoice) ProviderCredentials(projectID ...string) *VoiceProviderCredentials

type Teams

type Teams struct {
	// contains filtered or unexported fields
}

func (*Teams) Retrieve

func (r *Teams) Retrieve(ctx context.Context, o ...RequestOptions) (Response[Envelope[Team]], error)

type TemplateAuthentication

type TemplateAuthentication struct {
	OTPType                   string `json:"otpType"`
	CodeExample               string `json:"codeExample,omitempty"`
	AddSecurityRecommendation *bool  `json:"addSecurityRecommendation,omitempty"`
	CodeExpirationMinutes     *int   `json:"codeExpirationMinutes,omitempty"`
}

type TemplateButton

type TemplateButton struct {
	Type    string `json:"type"`
	Text    string `json:"text,omitempty"`
	URL     string `json:"url,omitempty"`
	Phone   string `json:"phone,omitempty"`
	Example string `json:"example,omitempty"`
}

type TemplateCarousel

type TemplateCarousel struct {
	Cards []TemplateCarouselCard `json:"cards"`
}

type TemplateCarouselCard

type TemplateCarouselCard struct {
	Header  TemplateHeader   `json:"header"`
	Body    string           `json:"body"`
	Buttons []TemplateButton `json:"buttons,omitempty"`
}

type TemplateContent

type TemplateContent struct {
	Name       string `json:"name"`
	Language   string `json:"language"`
	Components []any  `json:"components,omitempty"`
}

type TemplateDefinition

type TemplateDefinition struct {
	Version          int                       `json:"version"`
	Kind             string                    `json:"kind"`
	Category         string                    `json:"category"`
	Language         string                    `json:"language"`
	Header           *TemplateHeader           `json:"header,omitempty"`
	Body             string                    `json:"body"`
	Footer           string                    `json:"footer,omitempty"`
	Buttons          []TemplateButton          `json:"buttons,omitempty"`
	Carousel         *TemplateCarousel         `json:"carousel,omitempty"`
	Authentication   *TemplateAuthentication   `json:"authentication,omitempty"`
	LimitedTimeOffer *TemplateLimitedTimeOffer `json:"limitedTimeOffer,omitempty"`
	Variables        []TemplateVariable        `json:"variables"`
}

type TemplateHeader

type TemplateHeader struct {
	Format   string                 `json:"format"`
	Text     string                 `json:"text,omitempty"`
	Example  *TemplateHeaderExample `json:"example,omitempty"`
	Filename string                 `json:"filename,omitempty"`
}

type TemplateHeaderExample

type TemplateHeaderExample struct {
	Media    *string
	Location *TemplateLocationExample
}

func (TemplateHeaderExample) MarshalJSON

func (v TemplateHeaderExample) MarshalJSON() ([]byte, error)

func (*TemplateHeaderExample) UnmarshalJSON

func (v *TemplateHeaderExample) UnmarshalJSON(b []byte) error

type TemplateLimitedTimeOffer

type TemplateLimitedTimeOffer struct {
	Text          string `json:"text"`
	HasExpiration bool   `json:"hasExpiration"`
}

type TemplateLocationExample

type TemplateLocationExample struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Name      string  `json:"name,omitempty"`
	Address   string  `json:"address,omitempty"`
}

type TemplateVariable

type TemplateVariable struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Example string `json:"example"`
}

type Templates

type Templates struct {
	// contains filtered or unexported fields
}

func (*Templates) Delete

func (r *Templates) Delete(ctx context.Context, project, id string, o ...RequestOptions) (Response[Success], error)

func (*Templates) List

func (*Templates) Preview

func (*Templates) Retrieve

func (r *Templates) Retrieve(ctx context.Context, project, id string, o ...RequestOptions) (Response[Envelope[ProjectTemplate]], error)

func (*Templates) Submit

func (*Templates) Update

type TestEventFixtureInfo

type TestEventFixtureInfo struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Overrides   []string `json:"overrides"`
}

type TestEventOverrides

type TestEventOverrides struct {
	Text              string `json:"text,omitempty"`
	From              string `json:"from,omitempty"`
	PushName          string `json:"pushName,omitempty"`
	MediaType         string `json:"mediaType,omitempty"`
	Caption           string `json:"caption,omitempty"`
	AckStatus         string `json:"ackStatus,omitempty"`
	MessageID         string `json:"messageId,omitempty"`
	FailureReason     string `json:"failureReason,omitempty"`
	Video             *bool  `json:"video,omitempty"`
	DurationSeconds   *int   `json:"durationSeconds,omitempty"`
	CallEndReason     string `json:"callEndReason,omitempty"`
	RestrictionActive *bool  `json:"restrictionActive,omitempty"`
	Status            string `json:"status,omitempty"`
	StatusReason      string `json:"statusReason,omitempty"`
	TemplateName      string `json:"templateName,omitempty"`
	TemplateStatus    string `json:"templateStatus,omitempty"`
	Reason            string `json:"reason,omitempty"`
}

type TestWebhookRequest

type TestWebhookRequest struct {
	EventType    string               `json:"eventType,omitempty"`
	Body         *EncodedEventPayload `json:"body,omitempty"`
	ConnectionID string               `json:"connectionId,omitempty"`
}

type Testing

type Testing struct {
	// contains filtered or unexported fields
}

func (*Testing) CreateHistoryFixture

func (r *Testing) CreateHistoryFixture(ctx context.Context, project string, messages []TestingHistoryMessage, o ...RequestOptions) (Response[struct {
	FixtureID string `json:"fixtureId"`
}], error)

func (*Testing) GetPhone

func (r *Testing) GetPhone(ctx context.Context, connection string, o ...RequestOptions) (Response[TestingPhone], error)

func (*Testing) ListEventFixtures

func (r *Testing) ListEventFixtures(ctx context.Context, o ...RequestOptions) (Response[struct {
	Fixtures []TestEventFixtureInfo `json:"fixtures"`
}], error)

func (*Testing) TriggerEvent

func (*Testing) UnlinkPhoneDevice

func (r *Testing) UnlinkPhoneDevice(ctx context.Context, connection string, id int, o ...RequestOptions) (Response[UnlinkTestingPhoneDeviceResult], error)

type TestingConfiguration

type TestingConfiguration struct {
	Profile *struct {
		Name   string `json:"name,omitempty"`
		Status string `json:"status,omitempty"`
	} `json:"profile,omitempty"`
	AccountType      string `json:"accountType,omitempty"`
	PrimaryPlatform  string `json:"primaryPlatform,omitempty"`
	ReplyBehavior    string `json:"replyBehavior,omitempty"`
	FailureScenario  string `json:"failureScenario,omitempty"`
	HistoryFixtureID string `json:"historyFixtureId,omitempty"`
}

type TestingHistoryMessage

type TestingHistoryMessage struct {
	ID          string `json:"id"`
	SenderPhone string `json:"senderPhone"`
	Text        string `json:"text"`
	Timestamp   int64  `json:"timestamp"`
	FromMe      bool   `json:"fromMe"`
}

type TestingPhone

type TestingPhone struct {
	Connection string `json:"connection"`
	Phone      string `json:"phone"`
	Online     bool   `json:"online"`
	Devices    []struct {
		DeviceID int `json:"deviceId"`
	} `json:"devices"`
}

type TierPricing

type TierPricing struct {
	ID             string   `json:"id"`
	Tier           string   `json:"tier"`
	DailyRateCents float64  `json:"dailyRateCents"`
	Label          string   `json:"label"`
	Description    string   `json:"description"`
	Features       []string `json:"features"`
}

type TransferCustomerConnectionRequest

type TransferCustomerConnectionRequest struct {
	ProjectID        string `json:"projectId"`
	SourceCustomerID string `json:"sourceCustomerId"`
	Confirm          bool   `json:"confirm"`
}

type TrickleCandidate

type TrickleCandidate struct {
	Candidate     string `json:"candidate"`
	SDPMid        string `json:"sdpMid,omitempty"`
	SDPMLineIndex *int   `json:"sdpMLineIndex,omitempty"`
}

type TriggerTestEventRequest

type TriggerTestEventRequest struct {
	Event          string              `json:"event"`
	Overrides      *TestEventOverrides `json:"overrides,omitempty"`
	FromConnection string              `json:"fromConnection,omitempty"`
}

type TriggerTestEventResult

type TriggerTestEventResult struct {
	Event      string  `json:"event"`
	Connection string  `json:"connection"`
	Delivery   string  `json:"delivery"`
	EventID    *string `json:"eventId"`
	Source     string  `json:"source"`
}

type TypingRequest

type TypingRequest struct {
	Conversation ConversationReference `json:"conversation"`
	ID           string                `json:"id,omitempty"`
	State        string                `json:"state"`
}

type UnlinkTestingPhoneDeviceResult

type UnlinkTestingPhoneDeviceResult struct {
	Connection string `json:"connection"`
	DeviceID   int    `json:"deviceId"`
	Unlinked   bool   `json:"unlinked"`
}

type UpdateAudienceSegmentRequest

type UpdateAudienceSegmentRequest struct {
	ExpectedRevision int                   `json:"expectedRevision"`
	Name             *string               `json:"name,omitempty"`
	Rules            *AudienceSegmentRules `json:"rules,omitempty"`
}

UpdateAudienceSegmentRequest requires the last observed revision.

type UpdateCallPolicyRequest

type UpdateCallPolicyRequest struct {
	BlockedCountryCodes []string `json:"blockedCountryCodes"`
	ExpectedRevision    *int64   `json:"expectedRevision,omitempty"`
}

type UpdateCallRetentionRequest

type UpdateCallRetentionRequest struct {
	Policy           CallRetentionPolicy `json:"policy"`
	RetentionDays    *int                `json:"retentionDays,omitempty"`
	ExpectedRevision *int64              `json:"expectedRevision,omitempty"`
}

type UpdateCallSettingsRequest

type UpdateCallSettingsRequest struct {
	SimultaneousCalls *bool           `json:"simultaneousCalls,omitempty"`
	AcknowledgeRisk   *bool           `json:"acknowledgeRisk,omitempty"`
	CallsEnabled      *bool           `json:"callsEnabled,omitempty"`
	ConferenceMode    *bool           `json:"conferenceMode,omitempty"`
	InboundRoute      string          `json:"inboundRoute,omitempty"`
	SIPTrunkID        *NullableString `json:"sipTrunkId,omitempty"`
	SIPClaim          *bool           `json:"sipClaim,omitempty"`
	HostCloudAPICalls *bool           `json:"hostCloudApiCalls,omitempty"`
	ExpectedRevision  *int64          `json:"expectedRevision,omitempty"`
}

type UpdateCampaignFrequencyCapInput

type UpdateCampaignFrequencyCapInput struct {
	CampaignFrequencyCap
	Revision int `json:"revision"`
}

UpdateCampaignFrequencyCapInput replaces both windows. Revision is the value from the last read; nil limits remove the cap without beta access.

type UpdateCampaignRequest

type UpdateCampaignRequest struct {
	TemplateID        *Nullable[string]                     `json:"templateId,omitempty"`
	VariableMapping   *Nullable[CampaignVariableMapping]    `json:"variableMapping,omitempty"`
	TrackedLinks      *Nullable[CampaignTrackedLinks]       `json:"trackedLinks,omitempty"`
	Name              *string                               `json:"name,omitempty"`
	RecipientListID   *Nullable[string]                     `json:"recipientListId,omitempty"`
	SenderConfig      PlatformPayload                       `json:"senderConfig,omitempty"`
	ScheduledAt       *Nullable[int64]                      `json:"scheduledAt,omitempty"`
	SendWindow        *Nullable[CampaignSendWindowRequest]  `json:"sendWindow,omitempty"`
	MessageVariations *Nullable[[]CampaignMessageVariation] `json:"messageVariations,omitempty"`
	Variants          *Nullable[[]CampaignVariant]          `json:"variants,omitempty"`
	VariantStrategy   *Nullable[CampaignVariantStrategy]    `json:"variantStrategy,omitempty"`
	FollowUp          *Nullable[CampaignFollowUp]           `json:"followUp,omitempty"`
	// FrequencyCap replaces the campaign cap; null removes it. Draft or paused only.
	FrequencyCap *Nullable[CampaignFrequencyCap] `json:"frequencyCap,omitempty"`
	// Drip changes only the fields set; null makes the draft an ordinary campaign.
	Drip *Nullable[CampaignDripPatch] `json:"drip,omitempty"`
}

func (*UpdateCampaignRequest) UnmarshalJSON

func (v *UpdateCampaignRequest) UnmarshalJSON(b []byte) error

type UpdateConnectionRequest

type UpdateConnectionRequest struct {
	Configuration ConnectionConfigurationPatch `json:"configuration"`
	Revision      int64                        `json:"revision"`
}

func (*UpdateConnectionRequest) UnmarshalJSON

func (v *UpdateConnectionRequest) UnmarshalJSON(b []byte) error

type UpdateConnectionSafeModeRequest

type UpdateConnectionSafeModeRequest struct {
	Presence string `json:"presence,omitempty"`
	Typing   string `json:"typing,omitempty"`
	Reads    string `json:"reads,omitempty"`
	Pacing   string `json:"pacing,omitempty"`
}

type UpdateCustomerRequest

type UpdateCustomerRequest = CreateCustomerRequest

type UpdateFlowRequest

type UpdateFlowRequest struct {
	ExpectedUpdatedAt int64                      `json:"expectedUpdatedAt"`
	Name              *string                    `json:"name,omitempty"`
	Status            string                     `json:"status,omitempty"`
	Definition        map[string]json.RawMessage `json:"definition,omitempty"`
}

type UpdateFunctionRequest

type UpdateFunctionRequest struct {
	ExpectedRevision int64   `json:"expectedRevision"`
	Name             *string `json:"name,omitempty"`
	Enabled          *bool   `json:"enabled,omitempty"`
}

type UpdateLabelRequest

type UpdateLabelRequest struct {
	Name  *string `json:"name,omitempty"`
	Color *int    `json:"color,omitempty"`
}

type UpdateMessagingWebhookRequest

type UpdateMessagingWebhookRequest struct {
	URL     *string             `json:"url,omitempty"`
	Events  *[]string           `json:"events,omitempty"`
	HMACKey *string             `json:"hmacKey,omitempty"`
	Retries *WebhookRetryConfig `json:"retries,omitempty"`
	Headers *[]WebhookHeader    `json:"headers,omitempty"`
	Enabled *bool               `json:"enabled,omitempty"`
	Format  string              `json:"format,omitempty"`
}

func (UpdateMessagingWebhookRequest) GoString

func (UpdateMessagingWebhookRequest) String

type UpdateOfficialGroupRequest

type UpdateOfficialGroupRequest struct {
	Subject     *string `json:"subject,omitempty"`
	Description *string `json:"description,omitempty"`
}

type UpdateOptOutSettingsRequest

type UpdateOptOutSettingsRequest struct {
	Enabled        bool     `json:"enabled"`
	OptOutKeywords []string `json:"optOutKeywords"`
	OptInKeywords  []string `json:"optInKeywords"`
}

type UpdatePlatformCampaignRequest

type UpdatePlatformCampaignRequest struct {
	UpdateCampaignRequest
	MessagesArray *[]CampaignComposedMessage `json:"messagesArray,omitempty"`
	// SegmentID sets the saved segment, or null clears it. Unlaunched drafts only.
	SegmentID *Nullable[string] `json:"segmentId,omitempty"`
	Extra     PlatformPayload   `json:"-"`
}

func (UpdatePlatformCampaignRequest) MarshalJSON

func (v UpdatePlatformCampaignRequest) MarshalJSON() ([]byte, error)

func (*UpdatePlatformCampaignRequest) UnmarshalJSON

func (v *UpdatePlatformCampaignRequest) UnmarshalJSON(b []byte) error

type UpdateProjectHealthPolicyRequest

type UpdateProjectHealthPolicyRequest struct {
	Version             int64    `json:"version"`
	Enabled             bool     `json:"enabled"`
	Threshold           float64  `json:"threshold"`
	ConnectionAction    string   `json:"connectionAction"`
	SlowDownMPS         *float64 `json:"slowDownMps"`
	EmailNotification   bool     `json:"emailNotification"`
	WebhookNotification bool     `json:"webhookNotification"`
}

type UpdateProjectInsuranceEvidenceRequest

type UpdateProjectInsuranceEvidenceRequest struct {
	Enabled bool `json:"enabled"`
}

type UpdateProjectSafeModeRequest

type UpdateProjectSafeModeRequest struct {
	Presence    string `json:"presence,omitempty"`
	Typing      string `json:"typing,omitempty"`
	Reads       string `json:"reads,omitempty"`
	Pacing      string `json:"pacing,omitempty"`
	OnlineStart *int   `json:"onlineStart,omitempty"`
	OnlineEnd   *int   `json:"onlineEnd,omitempty"`
}

type UpdateProjectTemplateRequest

type UpdateProjectTemplateRequest struct {
	Name         *string             `json:"name,omitempty"`
	Status       string              `json:"status,omitempty"`
	Definition   *TemplateDefinition `json:"definition,omitempty"`
	SampleValues *map[string]string  `json:"sampleValues,omitempty"`
}

type UpdateProjectWarmupPlanRequest

type UpdateProjectWarmupPlanRequest struct {
	Enabled    *bool `json:"enabled,omitempty"`
	WarmupDays *int  `json:"warmupDays,omitempty"`
	DailyStart *int  `json:"dailyStart,omitempty"`
}

type UpdateQuickLinkSettingsRequest

type UpdateQuickLinkSettingsRequest struct {
	Enabled             *bool               `json:"enabled,omitempty"`
	SuccessCallbackURL  *Nullable[string]   `json:"successCallbackUrl,omitempty"`
	FailureCallbackURL  *Nullable[string]   `json:"failureCallbackUrl,omitempty"`
	BusinessName        *Nullable[string]   `json:"businessName,omitempty"`
	Headline            *Nullable[string]   `json:"headline,omitempty"`
	Description         *Nullable[string]   `json:"description,omitempty"`
	SuccessMessage      *Nullable[string]   `json:"successMessage,omitempty"`
	SupportURL          *Nullable[string]   `json:"supportUrl,omitempty"`
	PrivacyURL          *Nullable[string]   `json:"privacyUrl,omitempty"`
	TermsURL            *Nullable[string]   `json:"termsUrl,omitempty"`
	Accent              *Nullable[string]   `json:"accent,omitempty"`
	Theme               string              `json:"theme,omitempty"`
	HideWatermark       *bool               `json:"hideWatermark,omitempty"`
	AllowPhoneChange    *bool               `json:"allowPhoneChange,omitempty"`
	Shape               *Nullable[string]   `json:"shape,omitempty"`
	RadiusPx            *Nullable[int]      `json:"radiusPx,omitempty"`
	LogoMode            string              `json:"logoMode,omitempty"`
	LogoStorageID       *Nullable[string]   `json:"logoStorageId,omitempty"`
	LogoSourceStorageID *Nullable[string]   `json:"logoSourceStorageId,omitempty"`
	HistorySync         string              `json:"historySync,omitempty"`
	Methods             *Nullable[[]string] `json:"methods,omitempty"`
	DefaultMethod       *Nullable[string]   `json:"defaultMethod,omitempty"`
}

type UpdateSIPTrunkRequest

type UpdateSIPTrunkRequest struct {
	ExpectedRevision   *int64            `json:"expectedRevision,omitempty"`
	Name               *string           `json:"name,omitempty"`
	Enabled            *bool             `json:"enabled,omitempty"`
	Direction          *string           `json:"direction,omitempty"`
	Outbound           *SIPOutboundPatch `json:"outbound,omitempty"`
	Inbound            *SIPInboundPatch  `json:"inbound,omitempty"`
	Codecs             *[]string         `json:"codecs,omitempty"`
	MaxConcurrentCalls *int              `json:"maxConcurrentCalls,omitempty"`
}

type UpdateStopConfirmationSettingsRequest

type UpdateStopConfirmationSettingsRequest struct {
	TeamID   string                           `json:"teamId"`
	Enabled  bool                             `json:"enabled"`
	Locale   Nullable[StopConfirmationLocale] `json:"locale"`
	Revision int64                            `json:"revision"`
}

type UpdateVoiceAudioRequest

type UpdateVoiceAudioRequest struct {
	ExpectedRevision *int64         `json:"expectedRevision,omitempty"`
	Name             *string        `json:"name,omitempty"`
	RetentionDays    *Nullable[int] `json:"retentionDays,omitempty"`
}

type UpdateWebhookRequest

type UpdateWebhookRequest struct {
	Batching    *WebhookBatchingInput `json:"batching,omitempty"`
	URL         string                `json:"url,omitempty"`
	EventTypes  *[]string             `json:"eventTypes,omitempty"`
	Enabled     *bool                 `json:"enabled,omitempty"`
	Format      string                `json:"format,omitempty"`
	RetryPolicy *WebhookRetryPolicy   `json:"retryPolicy,omitempty"`
	Headers     *[]WebhookHeaderInput `json:"headers,omitempty"`
}

type UploadMediaType

type UploadMediaType string

UploadMediaType uses WhatsApp's transport name. Voice notes use ptt with audio keys.

const (
	UploadImage     UploadMediaType = "image"
	UploadVideo     UploadMediaType = "video"
	UploadAudio     UploadMediaType = "audio"
	UploadVoiceNote UploadMediaType = "ptt"
	UploadDocument  UploadMediaType = "document"
	UploadSticker   UploadMediaType = "sticker"
)

type UploadVoiceAudioRequest

type UploadVoiceAudioRequest struct {
	Name          string
	ContentType   string
	Body          io.Reader
	SizeBytes     int64
	RetentionDays *int
}

type UploadWhatsAppMediaOptions

type UploadWhatsAppMediaOptions struct {
	EncryptMediaOptions
	Egress           string                       // relay (default) or direct
	UploadTransport  WhatsAppMediaUploadTransport // optional customer encrypted-byte transport
	MaxAttempts      int                          // direct attempts per request; default 3
	DocumentPartSize int64                        // bounded document part; default 50 MiB
	RequestOptions   RequestOptions
}

type Usage

type Usage struct {
	// contains filtered or unexported fields
}

func (*Usage) IterateRecords

func (r *Usage) IterateRecords(ctx context.Context, p UsageRecordParams, o ...RequestOptions) iter.Seq2[UsageRecord, error]

func (*Usage) ListGates

func (*Usage) ListRecords

func (*Usage) Summary

type UsageConnectionTotal

type UsageConnectionTotal struct {
	Connection string            `json:"connection"`
	ProjectID  *string           `json:"projectId"`
	Meters     []UsageMeterTotal `json:"meters"`
}

type UsageDimension

type UsageDimension struct {
	String *string
	Number *float64
	Bool   *bool
}

func (UsageDimension) MarshalJSON

func (d UsageDimension) MarshalJSON() ([]byte, error)

func (*UsageDimension) UnmarshalJSON

func (d *UsageDimension) UnmarshalJSON(b []byte) error

type UsageGate

type UsageGate struct {
	Key       string             `json:"key"`
	Kind      string             `json:"kind"`
	Subject   string             `json:"subject"`
	Mode      string             `json:"mode"`
	Active    bool               `json:"active"`
	Limit     *float64           `json:"limit"`
	Used      *float64           `json:"used"`
	Unit      *string            `json:"unit"`
	OverLimit *bool              `json:"overLimit"`
	Decisions UsageGateDecisions `json:"decisions"`
}

type UsageGateDecisions

type UsageGateDecisions struct {
	WouldBlock      int64 `json:"wouldBlock"`
	Blocked         int64 `json:"blocked"`
	EvaluationError int64 `json:"evaluationError"`
}

type UsageGateList

type UsageGateList struct {
	Connection *string     `json:"connection"`
	Gates      []UsageGate `json:"gates"`
}

type UsageGateParams

type UsageGateParams struct {
	ProjectID  string
	Connection string
}

type UsageMeterTotal

type UsageMeterTotal struct {
	Meter     string  `json:"meter"`
	Unit      string  `json:"unit"`
	KeySource string  `json:"keySource"`
	Quantity  float64 `json:"quantity"`
	Records   int64   `json:"records"`
}

type UsageRateCard

type UsageRateCard struct {
	ID      string `json:"id"`
	Version int    `json:"version"`
}

type UsageRecord

type UsageRecord struct {
	ID            string                    `json:"id"`
	Meter         string                    `json:"meter"`
	Quantity      float64                   `json:"quantity"`
	Unit          string                    `json:"unit"`
	Dimensions    map[string]UsageDimension `json:"dimensions"`
	KeySource     string                    `json:"keySource"`
	SourceKind    string                    `json:"sourceKind"`
	SourceID      string                    `json:"sourceId"`
	ProjectID     *string                   `json:"projectId"`
	Connection    *string                   `json:"connection"`
	OccurredAt    string                    `json:"occurredAt"`
	RecordedAt    string                    `json:"recordedAt"`
	Revision      int64                     `json:"revision"`
	PricingState  string                    `json:"pricingState"`
	RateCard      *UsageRateCard            `json:"rateCard"`
	PricedCredits *float64                  `json:"pricedCredits"`
}

type UsageRecordPage

type UsageRecordPage struct {
	Records    []UsageRecord `json:"records"`
	NextCursor *string       `json:"nextCursor"`
}

type UsageRecordParams

type UsageRecordParams struct {
	UsageSummaryParams
	CallID string
	Meter  string
	ListParams
}

type UsageRecordedPayload

type UsageRecordedPayload struct {
	ID            string                    `json:"id"`
	Meter         string                    `json:"meter"`
	Quantity      float64                   `json:"quantity"`
	Unit          string                    `json:"unit"`
	Dimensions    map[string]UsageDimension `json:"dimensions"`
	KeySource     string                    `json:"keySource"`
	SourceKind    string                    `json:"sourceKind"`
	SourceID      string                    `json:"sourceId"`
	ProjectID     *string                   `json:"projectId"`
	Connection    *string                   `json:"connection"`
	OccurredAt    string                    `json:"occurredAt"`
	RecordedAt    string                    `json:"recordedAt"`
	Revision      int                       `json:"revision"`
	PricingState  string                    `json:"pricingState"`
	RateCard      *UsageRateCard            `json:"rateCard"`
	PricedCredits *float64                  `json:"pricedCredits"`
	// contains filtered or unexported fields
}

type UsageSummary

type UsageSummary struct {
	Period               string                 `json:"period"`
	Start                string                 `json:"start"`
	End                  string                 `json:"end"`
	ProjectID            *string                `json:"projectId"`
	Connection           *string                `json:"connection"`
	BillingEnabled       bool                   `json:"billingEnabled"`
	Meters               []UsageMeterTotal      `json:"meters"`
	Connections          []UsageConnectionTotal `json:"connections"`
	ConnectionsTruncated bool                   `json:"connectionsTruncated"`
}

type UsageSummaryParams

type UsageSummaryParams struct {
	ProjectID  string
	Connection string
	Period     string
}

type UserSecurityCode

type UserSecurityCode struct {
	ConversationReference
	NumericCode string `json:"numericCode"`
	QRCode      string `json:"qrCode"`
}

type Users

type Users struct {
	// contains filtered or unexported fields
}

func (*Users) GetSecurityCode

func (r *Users) GetSecurityCode(ctx context.Context, s, id string, o ...RequestOptions) (Response[Envelope[UserSecurityCode]], error)

type VerifiedWebhookDelivery

type VerifiedWebhookDelivery struct {
	Event *WebhookEvent
	Batch *WebhookEventBatch
}

WebhookDelivery contains exactly one of Event or Batch. Verify before dispatch; deduplicate batch and member IDs and acknowledge the entire delivery.

func ConstructWebhookDelivery

func ConstructWebhookDelivery(body []byte, signature, secret string) (VerifiedWebhookDelivery, error)

func ParseVerifiedWebhookDelivery

func ParseVerifiedWebhookDelivery(body []byte) (VerifiedWebhookDelivery, error)

type VerifyFlowForwardOptions

type VerifyFlowForwardOptions struct {
	Tolerance *time.Duration
	Now       time.Time
}

type VerifyLocalWebhookOptions

type VerifyLocalWebhookOptions struct {
	ToleranceSeconds *int64
	NowUnixSeconds   *int64
}

type VersionResponse

type VersionResponse struct {
	Version             string `json:"version"`
	BuildTime           string `json:"buildTime"`
	Environment         string `json:"env"`
	APIVersion          string `json:"apiVersion"`
	MinSupportedVersion string `json:"minSupportedVersion"`
}

type VideoFrame

type VideoFrame struct {
	Codec       byte
	Keyframe    bool
	Source      uint32
	TimestampUS uint64
	Data        []byte
}

type VoIP

type VoIP struct {
	// contains filtered or unexported fields
}

func (*VoIP) Accept

func (*VoIP) Check

func (*VoIP) End

func (r *VoIP) End(ctx context.Context, id string, o ...RequestOptions) (Response[Success], error)

func (*VoIP) Leave

func (*VoIP) ModerateWaitingRoom

ModerateWaitingRoom reauthorizes through the API and never automatically retries. Inspect Data.Data.OK; an unknown outcome must not be replayed.

func (*VoIP) Place

func (*VoIP) Reject

func (*VoIP) Report

func (*VoIP) RetrieveCallPermission

func (r *VoIP) RetrieveCallPermission(ctx context.Context, s, to string, o ...RequestOptions) (Response[Envelope[CallPermission]], error)

func (*VoIP) RetrieveCallSettings

func (r *VoIP) RetrieveCallSettings(ctx context.Context, s string, o ...RequestOptions) (Response[Envelope[ConnectionCallSettings]], error)

func (*VoIP) RingParticipant

func (r *VoIP) RingParticipant(ctx context.Context, id string, b AddCallParticipantRequest, o ...RequestOptions) (Response[Success], error)

func (*VoIP) SendReaction

func (r *VoIP) SendReaction(ctx context.Context, id string, b CallReactionRequest, o ...RequestOptions) (Response[Success], error)

func (*VoIP) SetHandRaised

func (r *VoIP) SetHandRaised(ctx context.Context, id string, b HandRaisedRequest, o ...RequestOptions) (Response[Success], error)

type VoiceAssetEventPayload

type VoiceAssetEventPayload struct {
	EventID    string `json:"eventId"`
	OccurredAt string `json:"occurredAt"`
	TeamID     string `json:"teamId"`
	ProjectID  string `json:"projectId"`
	AssetID    string `json:"assetId"`
	Name       string `json:"name"`
	Source     string `json:"source"`
	// contains filtered or unexported fields
}

type VoiceAssetFailedPayload

type VoiceAssetFailedPayload struct {
	VoiceAssetEventPayload
	FailureReason string `json:"failureReason"`
}

type VoiceAssetReadyPayload

type VoiceAssetReadyPayload struct {
	VoiceAssetEventPayload
	DurationMS     int64  `json:"durationMs"`
	ContentSHA256  string `json:"contentSha256"`
	OriginalFormat string `json:"originalFormat"`
}

type VoiceAudio

type VoiceAudio struct {
	// contains filtered or unexported fields
}

func (*VoiceAudio) Complete

func (*VoiceAudio) Delete

func (*VoiceAudio) List

func (*VoiceAudio) PreviewURL

func (*VoiceAudio) Retrieve

func (*VoiceAudio) Update

func (*VoiceAudio) Upload

Upload uses only the issued upload headers and then completes the asset.

func (*VoiceAudio) WaitUntilReady

type VoiceAudioAsset

type VoiceAudioAsset struct {
	ID                  string         `json:"id"`
	ProjectID           string         `json:"projectId"`
	Name                string         `json:"name"`
	Source              string         `json:"source"`
	Status              string         `json:"status"`
	FailureReason       *string        `json:"failureReason"`
	OriginalFormat      *string        `json:"originalFormat"`
	OriginalContentType *string        `json:"originalContentType"`
	SizeBytes           *int64         `json:"sizeBytes"`
	DurationMS          *int64         `json:"durationMs"`
	ContentSHA256       *string        `json:"contentSha256"`
	TTS                 *VoiceAudioTTS `json:"tts"`
	RetentionDays       *int           `json:"retentionDays"`
	ExpiresAt           *string        `json:"expiresAt"`
	InUseCount          int            `json:"inUseCount"`
	Revision            int64          `json:"revision"`
	CreatedAt           string         `json:"createdAt"`
	UpdatedAt           string         `json:"updatedAt"`
	ReadyAt             *string        `json:"readyAt"`
}

type VoiceAudioPreview

type VoiceAudioPreview struct {
	URL         string `json:"url"`
	ContentType string `json:"contentType"`
	ExpiresAt   string `json:"expiresAt"`
}

func (VoiceAudioPreview) GoString

func (v VoiceAudioPreview) GoString() string

func (VoiceAudioPreview) String

func (VoiceAudioPreview) String() string

type VoiceAudioTTS

type VoiceAudioTTS struct {
	Provider     string  `json:"provider"`
	VoiceID      string  `json:"voiceId"`
	Model        string  `json:"model"`
	Text         string  `json:"text"`
	Characters   int     `json:"characters"`
	KeySource    string  `json:"keySource"`
	CredentialID *string `json:"credentialId"`
}

type VoiceAudioUpload

type VoiceAudioUpload struct {
	URL       string            `json:"url"`
	Method    string            `json:"method"`
	Headers   map[string]string `json:"headers"`
	MaxBytes  int64             `json:"maxBytes"`
	ExpiresAt string            `json:"expiresAt"`
}

func (VoiceAudioUpload) GoString

func (v VoiceAudioUpload) GoString() string

func (VoiceAudioUpload) String

func (VoiceAudioUpload) String() string

type VoiceAudioUploadCreated

type VoiceAudioUploadCreated struct {
	Asset  VoiceAudioAsset  `json:"asset"`
	Upload VoiceAudioUpload `json:"upload"`
}

type VoiceProviderCredential

type VoiceProviderCredential struct {
	ID             string  `json:"id"`
	ProjectID      *string `json:"projectId"`
	Provider       string  `json:"provider"`
	Label          string  `json:"label"`
	KeyFingerprint string  `json:"keyFingerprint"`
	Status         string  `json:"status"`
	VerifiedAt     *string `json:"verifiedAt"`
	LastError      *string `json:"lastError"`
	Revision       int64   `json:"revision"`
	CreatedAt      string  `json:"createdAt"`
	UpdatedAt      string  `json:"updatedAt"`
}

type VoiceProviderCredentials

type VoiceProviderCredentials struct {
	// contains filtered or unexported fields
}

func (*VoiceProviderCredentials) Delete

func (*VoiceProviderCredentials) List

func (*VoiceProviderCredentials) Retrieve

func (*VoiceProviderCredentials) Verify

type VoiceResourceDeleted

type VoiceResourceDeleted struct {
	ID      string `json:"id"`
	Deleted bool   `json:"deleted"`
}

type WaitForVoiceAudioOptions

type WaitForVoiceAudioOptions struct{ Timeout, Interval time.Duration }

type WaitingRoomControl

type WaitingRoomControl struct {
	Type          string `json:"type"`
	RequestID     string `json:"requestId"`
	Operation     string `json:"operation"`
	Enabled       *bool  `json:"enabled,omitempty"`
	ParticipantID string `json:"participantId,omitempty"`
}

WaitingRoomControl is a correlated action on the provider's pending roster.

type WaitingRoomControlRequest

type WaitingRoomControlRequest struct {
	ConnectionID string             `json:"connectionId"`
	Participant  string             `json:"participant,omitempty"`
	Control      WaitingRoomControl `json:"control"`
}

type WaitingRoomControlResult

type WaitingRoomControlResult struct {
	Type      string `json:"type"`
	RequestID string `json:"requestId"`
	OK        bool   `json:"ok"`
	Code      string `json:"code,omitempty"`
}

type WarmupCurvePoint

type WarmupCurvePoint struct {
	Day       int `json:"day"`
	Allowance int `json:"allowance"`
}

type WarmupPlanSettings

type WarmupPlanSettings struct {
	Enabled    bool `json:"enabled"`
	WarmupDays int  `json:"warmupDays"`
	DailyStart int  `json:"dailyStart"`
}

type WebhookBatching

type WebhookBatching struct {
	Enabled   bool `json:"enabled"`
	MaxEvents int  `json:"maxEvents"`
	WindowMS  int  `json:"windowMs"`
}

type WebhookBatchingInput

type WebhookBatchingInput struct {
	Enabled   bool `json:"enabled"`
	MaxEvents *int `json:"maxEvents,omitempty"`
	WindowMS  *int `json:"windowMs,omitempty"`
}

type WebhookBlocklistChange

type WebhookBlocklistChange struct {
	Action      string `json:"action"`
	PhoneNumber string `json:"phoneNumber,omitempty"`
	BSUID       string `json:"bsuid,omitempty"`
	ID          string `json:"id"`
	Username    string `json:"username,omitempty"`
}

type WebhookCallCapabilities

type WebhookCallCapabilities struct {
	Video  bool `json:"video"`
	Invite bool `json:"invite"`
}

type WebhookCallConnection

type WebhookCallConnection struct {
	ID          string `json:"id"`
	Participant string `json:"participant"`
	Transport   string `json:"transport"`
}

type WebhookCallParticipant

type WebhookCallParticipant struct {
	Guest      *bool  `json:"guest,omitempty"`
	Name       string `json:"name,omitempty"`
	HandRaised *bool  `json:"handRaised,omitempty"`
	WebhookIdentity
	AudioMuted bool   `json:"audioMuted"`
	Video      bool   `json:"video"`
	State      string `json:"state"`
}

type WebhookConversation

type WebhookConversation struct {
	WebhookIdentity
	Sender *WebhookIdentity `json:"sender,omitempty"`
}

type WebhookCreationReceipt

type WebhookCreationReceipt struct {
	Webhook         PlatformWebhook    `json:"webhook"`
	OperationID     *string            `json:"operationId"`
	Idempotency     IdempotencyReceipt `json:"idempotency"`
	Secret          *string            `json:"secret"`
	SecretAvailable bool               `json:"secretAvailable"`
}

type WebhookDeletionReceipt

type WebhookDeletionReceipt struct {
	WebhookID   string             `json:"webhookId"`
	Deleted     bool               `json:"deleted"`
	OperationID *string            `json:"operationId"`
	Idempotency IdempotencyReceipt `json:"idempotency"`
}

type WebhookDeliveries

type WebhookDeliveries struct {
	// contains filtered or unexported fields
}

func (*WebhookDeliveries) ListAttempts

func (*WebhookDeliveries) Retrieve

func (*WebhookDeliveries) RetrieveAttempt

func (r *WebhookDeliveries) RetrieveAttempt(ctx context.Context, id, attempt string, o ...RequestOptions) (Response[WebhookDeliveryAttempt], error)

func (*WebhookDeliveries) Retry

type WebhookDelivery

type WebhookDelivery struct {
	ID           string  `json:"id"`
	TeamID       string  `json:"teamId"`
	ProjectID    *string `json:"projectId"`
	EventID      string  `json:"eventId"`
	WebhookID    string  `json:"webhookId"`
	Status       string  `json:"status"`
	AttemptCount int     `json:"attemptCount"`
	Capabilities struct {
		Retryable bool `json:"retryable"`
	} `json:"capabilities"`
	PayloadAvailability string  `json:"payloadAvailability"`
	ReplayableUntil     *string `json:"replayableUntil"`
	MetadataExpiresAt   string  `json:"metadataExpiresAt"`
	NextAttemptAt       *string `json:"nextAttemptAt"`
	LastAttemptAt       *string `json:"lastAttemptAt"`
	CompletedAt         *string `json:"completedAt"`
	CreatedAt           string  `json:"createdAt"`
	UpdatedAt           string  `json:"updatedAt"`
	LastOutcome         *struct {
		StatusCode *int    `json:"statusCode"`
		ErrorCode  *string `json:"errorCode"`
	} `json:"lastOutcome"`
}

type WebhookDeliveryAttempt

type WebhookDeliveryAttempt struct {
	ID          string  `json:"id"`
	TeamID      string  `json:"teamId"`
	ProjectID   *string `json:"projectId"`
	DeliveryID  string  `json:"deliveryId"`
	Number      int     `json:"number"`
	Status      string  `json:"status"`
	StartedAt   *string `json:"startedAt"`
	CompletedAt *string `json:"completedAt"`
	NextRetryAt *string `json:"nextRetryAt"`
	DurationMS  *int    `json:"durationMs"`
	StatusCode  *int    `json:"statusCode"`
	ErrorCode   *string `json:"errorCode"`
	Response    *struct {
		ContentType string `json:"contentType"`
		Excerpt     string `json:"excerpt"`
		Truncated   bool   `json:"truncated"`
	} `json:"response"`
	MetadataExpiresAt string `json:"metadataExpiresAt"`
}

type WebhookDeliveryRetryReceipt

type WebhookDeliveryRetryReceipt struct {
	DeliveryID  string             `json:"deliveryId"`
	AttemptID   string             `json:"attemptId"`
	OperationID string             `json:"operationId"`
	Idempotency IdempotencyReceipt `json:"idempotency"`
}

type WebhookEncodedHistory

type WebhookEncodedHistory struct {
	Encoding string `json:"encoding"`
	Data     string `json:"data"`
}

type WebhookEvent

type WebhookEvent struct {
	ID         string          `json:"id"`
	Connection string          `json:"connection"`
	ExternalID string          `json:"externalId,omitempty"`
	Timestamp  string          `json:"timestamp"`
	Event      string          `json:"event"`
	Payload    json.RawMessage `json:"payload"`
}

WebhookEvent retains unknown payloads without coercion. Connection can be empty on project events. The raw signed bytes must be verified before parsing.

func ConstructLocalWebhookEvent

func ConstructLocalWebhookEvent(raw []byte, signature, secret string, o VerifyLocalWebhookOptions) (WebhookEvent, error)

func ConstructWebhookEvent

func ConstructWebhookEvent(body []byte, signature, secret string) (WebhookEvent, error)

func ParseVerifiedWebhookEvent

func ParseVerifiedWebhookEvent(body []byte) (WebhookEvent, error)

func (WebhookEvent) Known

func (e WebhookEvent) Known() bool

func (WebhookEvent) TypedPayload

func (e WebhookEvent) TypedPayload() (KnownWebhookPayload, bool, error)

TypedPayload decodes a known payload into its public native type. The second result is false for unknown event names; unknown raw payloads are preserved.

type WebhookEventBatch

type WebhookEventBatch struct {
	Object  string         `json:"object"`
	Version int            `json:"version"`
	ID      string         `json:"id"`
	Events  []WebhookEvent `json:"events"`
}

type WebhookFailedGroupParticipant

type WebhookFailedGroupParticipant struct {
	Participant WebhookIdentity             `json:"participant"`
	Errors      []OfficialGroupWebhookError `json:"errors,omitempty"`
}

type WebhookFixture

type WebhookFixture struct {
	Body        []byte
	ContentType string
	Signature   string
	Headers     http.Header
}

func CreateWebhookFixture

func CreateWebhookFixture(event WebhookEvent, secret string) (WebhookFixture, error)

type WebhookGroupJoinRequest

type WebhookGroupJoinRequest struct {
	JoinRequestID string          `json:"joinRequestId"`
	User          WebhookIdentity `json:"user"`
	State         string          `json:"state"`
}

type WebhookHeader

type WebhookHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type WebhookHeaderInput

type WebhookHeaderInput struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type WebhookHeaderMetadata

type WebhookHeaderMetadata struct {
	Name string `json:"name"`
}

type WebhookHistoryMessage

type WebhookHistoryMessage struct {
	WebhookMessageReference
	Conversation WebhookIdentity `json:"conversation"`
	FromMe       *bool           `json:"fromMe,omitempty"`
}

type WebhookIdentity

type WebhookIdentity struct {
	ParentBSUID string `json:"parentBsuid,omitempty"`
	ID          string `json:"id"`
	PhoneNumber string `json:"phoneNumber,omitempty"`
	BSUID       string `json:"bsuid,omitempty"`
	Username    string `json:"username,omitempty"`
}

type WebhookMessageReference

type WebhookMessageReference struct {
	ID          string             `json:"id"`
	WhatsAppIDs WhatsAppMessageIDs `json:"whatsapp_ids"`
	WhatsAppID  string             `json:"whatsapp_id,omitempty"`
}

type WebhookMutationReceipt

type WebhookMutationReceipt struct {
	Webhook     PlatformWebhook    `json:"webhook"`
	OperationID *string            `json:"operationId"`
	Idempotency IdempotencyReceipt `json:"idempotency"`
}

type WebhookPaymentAmount

type WebhookPaymentAmount struct {
	Value  float64 `json:"value"`
	Offset float64 `json:"offset"`
}

type WebhookPaymentTransaction

type WebhookPaymentTransaction struct {
	ID                    string `json:"id,omitempty"`
	ProviderTransactionID string `json:"providerTransactionId,omitempty"`
	Provider              string `json:"provider,omitempty"`
	Status                string `json:"status,omitempty"`
	Method                string `json:"method,omitempty"`
	ErrorCode             string `json:"errorCode,omitempty"`
}

type WebhookPollOption

type WebhookPollOption struct {
	Name string `json:"name"`
	Hash string `json:"hash"`
}

type WebhookRetryConfig

type WebhookRetryConfig struct {
	Attempts     int    `json:"attempts"`
	DelaySeconds int    `json:"delaySeconds"`
	Policy       string `json:"policy"`
}

type WebhookRetryPolicy

type WebhookRetryPolicy struct {
	MaximumAttempts     int    `json:"maximumAttempts"`
	Backoff             string `json:"backoff"`
	InitialDelaySeconds int    `json:"initialDelaySeconds"`
}

type WebhookRotationReceipt

type WebhookRotationReceipt struct {
	WebhookID       string                `json:"webhookId"`
	OperationID     *string               `json:"operationId"`
	Secret          *string               `json:"secret"`
	SecretAvailable bool                  `json:"secretAvailable"`
	SecretMetadata  WebhookSecretMetadata `json:"secretMetadata"`
	Idempotency     IdempotencyReceipt    `json:"idempotency"`
}

type WebhookSecretMetadata

type WebhookSecretMetadata struct {
	Version            int     `json:"version"`
	CreatedAt          string  `json:"createdAt"`
	PreviousValidUntil *string `json:"previousValidUntil"`
}

type Webhooks

type Webhooks struct {
	// contains filtered or unexported fields
}

func (*Webhooks) Delete

func (*Webhooks) List

func (*Webhooks) Retrieve

func (r *Webhooks) Retrieve(ctx context.Context, id string, o ...RequestOptions) (Response[PlatformWebhook], error)

func (*Webhooks) Test

type WhatsAppAccount

type WhatsAppAccount struct {
	ID                string `json:"id,omitempty"`
	BSUID             string `json:"bsuid,omitempty"`
	Username          string `json:"username,omitempty"`
	PhoneNumber       string `json:"phoneNumber,omitempty"`
	PushName          string `json:"pushName"`
	BusinessName      string `json:"businessName,omitempty"`
	PhonePlatform     string `json:"phonePlatform,omitempty"`
	AccountType       string `json:"accountType,omitempty"`
	ProfilePictureURL string `json:"profilePicUrl,omitempty"`
}

type WhatsAppAccountActivity

type WhatsAppAccountActivity struct {
	Observed                      bool     `json:"observed"`
	PrimaryPhoneActivitySignals   int64    `json:"primaryPhoneActivitySignals"`
	PrimaryPhoneActivePeriods     int64    `json:"primaryPhoneActivePeriods"`
	CompletedPhoneActivityPeriods int64    `json:"completedPhoneActivityPeriods"`
	PhoneActivityMS               float64  `json:"phoneActivityMs"`
	AveragePhoneActivityMS        *float64 `json:"averagePhoneActivityMs"`
	PhoneQuietGaps                int64    `json:"phoneQuietGaps"`
	PhoneQuietMS                  float64  `json:"phoneQuietMs"`
	AveragePhoneQuietMS           *float64 `json:"averagePhoneQuietMs"`
	PrimaryPhoneMessages          int64    `json:"primaryPhoneMessages"`
	OtherDeviceMessages           int64    `json:"otherDeviceMessages"`
	PrimaryPhoneReplies           int64    `json:"primaryPhoneReplies"`
	OtherDeviceReplies            int64    `json:"otherDeviceReplies"`
	AveragePrimaryPhoneResponseMS *float64 `json:"averagePrimaryPhoneResponseMs"`
	AverageOtherDeviceResponseMS  *float64 `json:"averageOtherDeviceResponseMs"`
	LastPrimaryPhoneAt            *int64   `json:"lastPrimaryPhoneAt"`
}

type WhatsAppAnalytics

type WhatsAppAnalytics struct {
	CallSeries    []WhatsAppCallSeriesPoint     `json:"callSeries"`
	Enabled       bool                          `json:"enabled"`
	Period        AnalyticsPeriod               `json:"period"`
	RequestVitals AnalyticsRequestVitals        `json:"requestVitals"`
	Summary       *WhatsAppAnalyticsSummary     `json:"summary"`
	Connections   []WhatsAppAnalyticsConnection `json:"connections"`
	Series        []WhatsAppSeriesPoint         `json:"series"`
}

type WhatsAppAnalyticsConnection

type WhatsAppAnalyticsConnection struct {
	WhatsAppMetrics
	ConnectionID string `json:"connectionId"`
	ProjectID    string `json:"projectId"`
	ProjectName  string `json:"projectName"`
	Name         string `json:"name"`
	Backend      string `json:"backend"`
	Status       string `json:"status"`
}

type WhatsAppAnalyticsSummary

type WhatsAppAnalyticsSummary struct {
	WhatsAppMetrics
	TotalConnections     int `json:"totalConnections"`
	MeasuredConnections  int `json:"measuredConnections"`
	ConnectedConnections int `json:"connectedConnections"`
}

type WhatsAppBusinessSegment

type WhatsAppBusinessSegment struct {
	Dimension              string      `json:"dimension"`
	Key                    string      `json:"key"`
	SendAttempts           int64       `json:"sendAttempts"`
	Sent                   int64       `json:"sent"`
	SendFailures           int64       `json:"sendFailures"`
	SendFailureRate        *float64    `json:"sendFailureRate"`
	CompletedConversations int64       `json:"completedConversations"`
	DeliveredConversations int64       `json:"deliveredConversations"`
	ReadConversations      int64       `json:"readConversations"`
	RepliedConversations   int64       `json:"repliedConversations"`
	DeliveryRate           *float64    `json:"deliveryRate"`
	ReadRate               *float64    `json:"readRate"`
	ReplyRate              *float64    `json:"replyRate"`
	AverageCustomerReplyMS *float64    `json:"averageCustomerReplyMs"`
	ReadRateInterval95     *[2]float64 `json:"readRateInterval95"`
	ReplyRateInterval95    *[2]float64 `json:"replyRateInterval95"`
	ReadRateDifference     *float64    `json:"readRateDifference"`
	ReplyRateDifference    *float64    `json:"replyRateDifference"`
	ShareOfConversations   *float64    `json:"shareOfConversations"`
	ShareOfSends           *float64    `json:"shareOfSends"`
}

type WhatsAppCallSeriesPoint

type WhatsAppCallSeriesPoint struct {
	CallOutcomeMetrics
	ConnectionID string `json:"connectionId"`
	TS           int64  `json:"ts"`
}

type WhatsAppConversationBreakdown

type WhatsAppConversationBreakdown struct {
	Measured             bool                         `json:"measured"`
	Complete             bool                         `json:"complete"`
	ObservedBuckets      int                          `json:"observedBuckets"`
	DroppedConversations int64                        `json:"droppedConversations"`
	Truncated            bool                         `json:"truncated"`
	Buckets              []WhatsAppConversationBucket `json:"buckets"`
	Rows                 []WhatsAppConversationGroup  `json:"rows"`
}

type WhatsAppConversationBucket

type WhatsAppConversationBucket struct {
	TS       int64 `json:"ts"`
	Complete bool  `json:"complete"`
}

type WhatsAppConversationGroup

type WhatsAppConversationGroup struct {
	RecipientCountry       string   `json:"recipientCountry,omitempty"`
	RecipientDeviceCount   string   `json:"recipientDeviceCount,omitempty"`
	TS                     int64    `json:"ts"`
	MessageType            string   `json:"messageType"`
	TextBand               string   `json:"textBand"`
	Origin                 string   `json:"origin"`
	CallingCode            string   `json:"callingCode"`
	CustomerDevices        string   `json:"customerDevices"`
	CompletedConversations int64    `json:"completedConversations"`
	DeliveredConversations int64    `json:"deliveredConversations"`
	ReadConversations      int64    `json:"readConversations"`
	RepliedConversations   int64    `json:"repliedConversations"`
	ReplyLatencySumMS      float64  `json:"replyLatencySumMs"`
	ReadRate               *float64 `json:"readRate"`
	ReplyRate              *float64 `json:"replyRate"`
	AverageCustomerReplyMS *float64 `json:"averageCustomerReplyMs"`
}

type WhatsAppCustomerActivity

type WhatsAppCustomerActivity struct {
	Observed       bool  `json:"observed"`
	OnlineSignals  int64 `json:"onlineSignals"`
	OfflineSignals int64 `json:"offlineSignals"`
	TypingSignals  int64 `json:"typingSignals"`
}

type WhatsAppDevice

type WhatsAppDevice struct {
	DeviceIndex       int    `json:"deviceIndex"`
	EstimatedPlatform string `json:"estimatedPlatform"`
	ReportedClass     string `json:"reportedClass"`
	LastActiveAt      *int64 `json:"lastActiveAt"`
	Listed            *bool  `json:"listed"`
}

type WhatsAppDeviceAnalytics

type WhatsAppDeviceAnalytics struct {
	Detector          string                   `json:"detector"`
	Measured          bool                     `json:"measured"`
	Complete          bool                     `json:"complete"`
	ObservedBuckets   int                      `json:"observedBuckets"`
	CustomerMessages  *int64                   `json:"customerMessages"`
	AccountMessages   *int64                   `json:"accountMessages"`
	CustomerPlatforms []WhatsAppDevicePlatform `json:"customerPlatforms"`
	AccountPlatforms  []WhatsAppDevicePlatform `json:"accountPlatforms"`
	Inventory         *WhatsAppDeviceInventory `json:"inventory"`
}

type WhatsAppDeviceInventory

type WhatsAppDeviceInventory struct {
	ListObserved bool             `json:"listObserved"`
	ListCurrent  bool             `json:"listCurrent"`
	ObservedAt   *int64           `json:"observedAt"`
	DeviceCount  *int             `json:"deviceCount"`
	Truncated    bool             `json:"truncated"`
	Devices      []WhatsAppDevice `json:"devices"`
}

type WhatsAppDevicePlatform

type WhatsAppDevicePlatform struct {
	Platform string   `json:"platform"`
	Messages int64    `json:"messages"`
	Share    *float64 `json:"share"`
}

type WhatsAppEncryptedUploadBody

type WhatsAppEncryptedUploadBody struct {
	// contains filtered or unexported fields
}

WhatsAppEncryptedUploadBody opens repeatable ciphertext||MAC streams. The underlying repeat pass checks EOF/hash before the final bytes are released.

func (*WhatsAppEncryptedUploadBody) EncryptedLength

func (b *WhatsAppEncryptedUploadBody) EncryptedLength() int64

func (*WhatsAppEncryptedUploadBody) FileEncSHA256

func (b *WhatsAppEncryptedUploadBody) FileEncSHA256() []byte

func (*WhatsAppEncryptedUploadBody) GoString

func (b *WhatsAppEncryptedUploadBody) GoString() string

func (*WhatsAppEncryptedUploadBody) MarshalJSON

func (b *WhatsAppEncryptedUploadBody) MarshalJSON() ([]byte, error)

func (*WhatsAppEncryptedUploadBody) MediaType

func (*WhatsAppEncryptedUploadBody) Open

func (*WhatsAppEncryptedUploadBody) String

type WhatsAppEngagement

type WhatsAppEngagement struct {
	WindowHours            int      `json:"windowHours"`
	CompletedConversations int64    `json:"completedConversations"`
	DeliveredConversations int64    `json:"deliveredConversations"`
	ReadConversations      int64    `json:"readConversations"`
	RepliedConversations   int64    `json:"repliedConversations"`
	DeliveryRate           *float64 `json:"deliveryRate"`
	ReadRate               *float64 `json:"readRate"`
	ReplyRate              *float64 `json:"replyRate"`
	AverageCustomerReplyMS *float64 `json:"averageCustomerReplyMs"`
	Complete               bool     `json:"complete"`
	DroppedConversations   int64    `json:"droppedConversations"`
	DroppedRecords         int64    `json:"droppedRecords"`
	DroppedReceiptJoins    int64    `json:"droppedReceiptJoins"`
}

type WhatsAppMediaDescriptor

type WhatsAppMediaDescriptor struct {
	MediaKind     string
	URL           string
	DirectPath    string
	MediaKey      []byte
	FileSHA256    []byte
	FileEncSHA256 []byte
	FileLength    *int64
	MimeType      string
	Filename      string
}

func DecodeWhatsAppMedia

func DecodeWhatsAppMedia(encoded, kind string) (WhatsAppMediaDescriptor, error)

func MediaDescriptorFromEvent

func MediaDescriptorFromEvent(e WebhookEvent) (WhatsAppMediaDescriptor, error)

func (WhatsAppMediaDescriptor) GoString

func (d WhatsAppMediaDescriptor) GoString() string

func (WhatsAppMediaDescriptor) String

func (d WhatsAppMediaDescriptor) String() string

type WhatsAppMediaDownload

type WhatsAppMediaDownload struct {
	Bytes      []byte
	MediaKind  string
	MimeType   string
	Filename   string
	FileLength *int64
}

func (WhatsAppMediaDownload) GoString

func (d WhatsAppMediaDownload) GoString() string

func (WhatsAppMediaDownload) String

func (d WhatsAppMediaDownload) String() string

type WhatsAppMediaDownloadOptions

type WhatsAppMediaDownloadOptions struct {
	MaxBytes   int64
	HTTPClient *http.Client
}

type WhatsAppMediaKeys

type WhatsAppMediaKeys struct {
	IV        []byte
	CipherKey []byte
	MACKey    []byte
}

func DeriveWhatsAppMediaKeys

func DeriveWhatsAppMediaKeys(key []byte, kind string) (WhatsAppMediaKeys, error)

func (WhatsAppMediaKeys) GoString

func (k WhatsAppMediaKeys) GoString() string

func (WhatsAppMediaKeys) String

func (k WhatsAppMediaKeys) String() string

type WhatsAppMediaResource

type WhatsAppMediaResource struct {
	// contains filtered or unexported fields
}

func (*WhatsAppMediaResource) CreateUploadGrant

func (r *WhatsAppMediaResource) CreateUploadGrant(ctx context.Context, connection string, kind UploadMediaType, encryptedHash []byte, options ...RequestOptions) (WhatsAppUploadGrant, error)

func (*WhatsAppMediaResource) RelayUpload

func (*WhatsAppMediaResource) Upload

func (*WhatsAppMediaResource) UploadBytes

func (r *WhatsAppMediaResource) UploadBytes(ctx context.Context, connection string, plaintext []byte, options UploadWhatsAppMediaOptions) (WhatsAppMediaUploadResult, error)

func (*WhatsAppMediaResource) UploadTransport

UploadTransport returns a reusable built-in transport that customer code can wrap. Only its encrypted-body upload boundary is exposed to the wrapper.

type WhatsAppMediaSendDescriptor

type WhatsAppMediaSendDescriptor struct {
	MediaType     UploadMediaType `json:"-"`
	DirectPath    string          `json:"-"`
	URL           string          `json:"-"`
	MediaKey      []byte          `json:"-"`
	FileSHA256    []byte          `json:"-"`
	FileEncSHA256 []byte          `json:"-"`
	FileLength    int64           `json:"-"`
	MimeType      string          `json:"-"`
	WhatsAppMediaSendMetadata
}

WhatsAppMediaSendDescriptor is secret. Standard message sends transmit its media key to Polymorfa. Zero-knowledge sends belong to the application sidecar.

func (WhatsAppMediaSendDescriptor) GoString

func (descriptor WhatsAppMediaSendDescriptor) GoString() string

func (WhatsAppMediaSendDescriptor) MarshalJSON

func (descriptor WhatsAppMediaSendDescriptor) MarshalJSON() ([]byte, error)

func (WhatsAppMediaSendDescriptor) String

func (descriptor WhatsAppMediaSendDescriptor) String() string

func (WhatsAppMediaSendDescriptor) Wire

func (descriptor WhatsAppMediaSendDescriptor) Wire() (map[string]any, error)

Wire explicitly returns secret-bearing send fields. Do not log this map.

type WhatsAppMediaSendMetadata

type WhatsAppMediaSendMetadata struct {
	MimeType          string `json:"-"`
	Thumbnail         []byte `json:"-"`
	Width             *int64 `json:"-"`
	Height            *int64 `json:"-"`
	Seconds           *int64 `json:"-"`
	Waveform          []byte `json:"-"`
	MediaKeyTimestamp *int64 `json:"-"`
	IsAnimated        *bool  `json:"-"`
}

type WhatsAppMediaSource

type WhatsAppMediaSource func(context.Context) (io.ReadCloser, error)

WhatsAppMediaSource opens a fresh immutable plaintext stream on each pass. The SDK closes each returned stream; implementations must honor ctx.

type WhatsAppMediaStream

type WhatsAppMediaStream struct {
	Body                          io.ReadCloser
	MediaKind, MimeType, Filename string
	FileLength                    *int64
}

type WhatsAppMediaUploadResult

type WhatsAppMediaUploadResult struct {
	EncryptedMediaInfo
	WhatsAppUploadLocation
	Egress string `json:"egress"`
}

func (WhatsAppMediaUploadResult) GoString

func (result WhatsAppMediaUploadResult) GoString() string

func (WhatsAppMediaUploadResult) String

func (result WhatsAppMediaUploadResult) String() string

type WhatsAppMediaUploadTransport

type WhatsAppMediaUploadTransport interface {
	Name() string
	Upload(context.Context, string, *WhatsAppEncryptedUploadBody) (WhatsAppUploadLocation, error)
}

WhatsAppMediaUploadTransport moves encrypted bytes. Implementations receive no plaintext, media key, API credential or signed grant from this interface.

type WhatsAppMediaVerifyMode

type WhatsAppMediaVerifyMode string
const VerifyBeforeRelease WhatsAppMediaVerifyMode = "before-release"
const VerifyStreaming WhatsAppMediaVerifyMode = "streaming"

type WhatsAppMessageAnalysis

type WhatsAppMessageAnalysis struct {
	Complete bool                      `json:"complete"`
	Segments []WhatsAppBusinessSegment `json:"segments"`
}

type WhatsAppMessageIDs

type WhatsAppMessageIDs struct {
	LinkedDevices string `json:"linked_devices,omitempty"`
	OfficialAPI   string `json:"official_api,omitempty"`
}

type WhatsAppMetrics

type WhatsAppMetrics struct {
	RecipientActivity         *WhatsAppRecipientActivity    `json:"recipientActivity,omitempty"`
	DeviceAnalytics           WhatsAppDeviceAnalytics       `json:"deviceAnalytics"`
	ConversationBreakdown     WhatsAppConversationBreakdown `json:"conversationBreakdown"`
	Calls                     CallBusinessMetrics           `json:"calls"`
	Measured                  bool                          `json:"measured"`
	ObservedHours             int                           `json:"observedHours"`
	LastObservedAt            *int64                        `json:"lastObservedAt"`
	OutgoingMessages          int64                         `json:"outgoingMessages"`
	IncomingMessages          int64                         `json:"incomingMessages"`
	SendAttempts              int64                         `json:"sendAttempts"`
	SendFailures              int64                         `json:"sendFailures"`
	SendFailureRate           *float64                      `json:"sendFailureRate"`
	BusinessReplies           int64                         `json:"businessReplies"`
	AverageBusinessResponseMS *float64                      `json:"averageBusinessResponseMs"`
	OnlineMS                  float64                       `json:"onlineMs"`
	Disconnects               int64                         `json:"disconnects"`
	ConnectFailures           int64                         `json:"connectFailures"`
	StreamErrors              int64                         `json:"streamErrors"`
	KeepaliveTimeouts         int64                         `json:"keepaliveTimeouts"`
	Engagement                WhatsAppEngagement            `json:"engagement"`
	MessageAnalysis           WhatsAppMessageAnalysis       `json:"messageAnalysis"`
	CustomerActivity          WhatsAppCustomerActivity      `json:"customerActivity"`
	AccountActivity           WhatsAppAccountActivity       `json:"accountActivity"`
	ResponseQueue             *WhatsAppResponseQueue        `json:"responseQueue"`
}

type WhatsAppRecipientActivity

type WhatsAppRecipientActivity struct {
	Measured        bool                           `json:"measured"`
	Complete        bool                           `json:"complete"`
	ObservedBuckets int                            `json:"observedBuckets"`
	DroppedSignals  int64                          `json:"droppedSignals"`
	Truncated       bool                           `json:"truncated"`
	Rows            []WhatsAppRecipientActivityRow `json:"rows"`
}

type WhatsAppRecipientActivityRow

type WhatsAppRecipientActivityRow struct {
	TS                   int64    `json:"ts"`
	RecipientCountry     string   `json:"recipientCountry"`
	RecipientDeviceCount string   `json:"recipientDeviceCount"`
	DeviceSource         string   `json:"deviceSource"`
	IncomingMessages     int64    `json:"incomingMessages"`
	DeliveryReceipts     int64    `json:"deliveryReceipts"`
	ReadReceipts         int64    `json:"readReceipts"`
	OnlineSignals        int64    `json:"onlineSignals"`
	OfflineSignals       int64    `json:"offlineSignals"`
	TypingSignals        int64    `json:"typingSignals"`
	LastSignalAt         int64    `json:"lastSignalAt"`
	QuietGaps            int64    `json:"quietGaps"`
	QuietGapMS           float64  `json:"quietGapMs"`
	AverageQuietGapMS    *float64 `json:"averageQuietGapMs"`
}

type WhatsAppResponseQueue

type WhatsAppResponseQueue struct {
	AwaitingReply   int64   `json:"awaitingReply"`
	OldestWaitingMS float64 `json:"oldestWaitingMs"`
	ObservedAt      int64   `json:"observedAt"`
	Complete        bool    `json:"complete"`
}

type WhatsAppSeriesPoint

type WhatsAppSeriesPoint struct {
	CustomerOnlineSignals         int64    `json:"customerOnlineSignals"`
	CustomerTypingSignals         int64    `json:"customerTypingSignals"`
	PrimaryPhoneMessages          int64    `json:"primaryPhoneMessages"`
	OtherDeviceMessages           int64    `json:"otherDeviceMessages"`
	PrimaryPhoneReplies           int64    `json:"primaryPhoneReplies"`
	PhoneActivePeriods            int64    `json:"phoneActivePeriods"`
	CompletedPhoneActivityPeriods int64    `json:"completedPhoneActivityPeriods"`
	PhoneActivityMS               float64  `json:"phoneActivityMs"`
	PhoneQuietGaps                int64    `json:"phoneQuietGaps"`
	PhoneQuietMS                  float64  `json:"phoneQuietMs"`
	ConnectionID                  string   `json:"connectionId"`
	TS                            int64    `json:"ts"`
	OutgoingMessages              int64    `json:"outgoingMessages"`
	IncomingMessages              int64    `json:"incomingMessages"`
	SendFailures                  int64    `json:"sendFailures"`
	BusinessReplies               int64    `json:"businessReplies"`
	AverageBusinessResponseMS     *float64 `json:"averageBusinessResponseMs"`
	OnlineMS                      float64  `json:"onlineMs"`
	Disconnects                   int64    `json:"disconnects"`
}

type WhatsAppUploadGrant

type WhatsAppUploadGrant struct {
	Host      string
	UploadURL string `json:"-"`
	ExpiresAt time.Time
}

func (WhatsAppUploadGrant) GoString

func (grant WhatsAppUploadGrant) GoString() string

func (WhatsAppUploadGrant) String

func (grant WhatsAppUploadGrant) String() string

type WhatsAppUploadLocation

type WhatsAppUploadLocation struct {
	DirectPath string `json:"-"`
	URL        string `json:"-"`
	Handle     string `json:"-"`
}

func (WhatsAppUploadLocation) GoString

func (location WhatsAppUploadLocation) GoString() string

func (WhatsAppUploadLocation) String

func (location WhatsAppUploadLocation) String() string

Source Files

Directories

Path Synopsis
Package storage implements customer-owned schema3 storage boundaries.
Package storage implements customer-owned schema3 storage boundaries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL