riak-client is a rich client for Riak, the distributed database by Basho. It supports the full HTTP and Protocol Buffers interfaces including storage operations, bucket configuration, link-walking, secondary indexes and map-reduce.
basic and simple tagging system for mongoid using map-reduce function
Streamlined, programmatic access to Amazon's Elastic Map Reduce service, driven by the Sharethrough team's requirements for belting out EMR jobs.
Rubydoop embeds a JRuby runtime in Hadoop, letting you write map reduce code in Ruby without using the streaming APIs
A javascript library abstraction for dealing with patients in hQuery map reduce functions
Cubicle provides a dsl and aggregation caching framework for automating the generation, execution and caching of map reduce queries when using MongoDB in Ruby. Cubicle also includes a MongoMapper plugin for quickly performing ad-hoc, multi-level group-by queries against a MongoMapper model.
Tem Map-Reduce proof of concept: database search.
Easily add MongoDB mapreduce functions and runners to your Mongo ORM classes
The MapReduce gem is the easiest way to write custom, distributed, larger than memory map-reduce jobs
a library which uses the map-reduce capabilities of mongodb to group entities based on tags.
Reduceable makes map reduce in mongo easy
Distribute map-reduce tasks with ActiveJob, storing the results in Redis (or another backend)
Simple distributed Map Reduce Framework on Ruby
a library which uses the map-reduce capabilities of mongodb to group entities based on tags.
HardBoiled helps you reducing your complex models (including their associations) down to simple hashes usable for serialization into JSON or XML. It leverages a DSL similar to thoughtbot's FactoryGirl to make mappings maintainable and pain-free.
Programmatic access to Amazon's Elastic Map Reduce service.
Helping Ruby developers and their companies, unlock their key-value store data, through associative and sequential based access, providing unprecedented support for map reduce behaviors, native to the Ruby language
Snail is a single-threaded, in-memory, barebones MapReduce framework written in Ruby to quickly prototype and test parallel algorithms.
List Helpers is a Compass extension providing useful list helper functions like: map, filter, reduce, every and some.
This is a full implementation of the MapReduce algorithm specifically for use with lambdas. It is useful for problems that are a natural fit for the MapReduce model (such as building cross-references) when the data set fits easily within memory.
a poorly thought out and stupid source+map+reduce contraption
Simple MapReduce framework
Collection of common map_reduce operations, implemented with mongoid.
HardBoiled helps you reducing your complex models (including their associations) down to simple hashes usable for serialization into JSON or XML. It leverages a DSL similar to thoughtbot's FactoryGirl to make mappings maintainable and pain-free.
Map reduce your mongo documents writing in with coffeescript.
Tem Map-Reduce proof of concept: database search.
riak-client is a rich client for Riak, the distributed database by Basho. It supports the full HTTP and Protocol Buffers interfaces including storage operations, bucket configuration, link-walking, secondary indexes and map-reduce.
Map reduce library for Ruby for Rails 3 log files
# 1MSG Ruby SDK Official Ruby SDK for the **1MSG WhatsApp Business API**. This document is generated from the public OpenAPI contract. It covers install, auth, quick start, and every public operation available in the client. | | | |---|---| | **RubyGems** | [`one_msg_sdk`](https://rubygems.org/gems/one_msg_sdk) | | **Source** | [github.com/1msg/1msg-sdk/ruby](https://github.com/1msg/1msg-sdk/tree/main/ruby) | | **API docs** | [docs.1msg.io](https://docs.1msg.io/) | | **Platform** | [platform.1msg.io](https://platform.1msg.io/) | | **Support** | support@1msg.io | | **OpenAPI version** | 1.0.0 | | **Operations** | 60 | | **AI agent guide** | [AGENTS.md](./AGENTS.md) | --- ## Install ```bash gem install one_msg_sdk -v 2.0.2 ``` ## Requirements | Variable | Where to get it | Example | |----------|-----------------|---------| | `baseUrl` | Platform → channel → API host | `https://api.1msg.io` | | `instanceId` | Platform → channel id | `ODI371267300` | | `token` | Platform → channel → API token | JWT or API key | Use environment variables (`MSG_API_TOKEN`, `MSG_INSTANCE_ID`). Never commit tokens. ## Quick start ```ruby require 'one_msg_sdk' OneMsgSdk.configure do |config| config.host = "https://api.1msg.io/#{ENV.fetch('MSG_INSTANCE_ID')}" end messaging = OneMsgSdk::MessagingApi.new messaging.send_message( ENV.fetch('MSG_API_TOKEN'), 'Hello from 1MSG SDK', nil, '12020721369@c.us' ) ``` ## Authentication All requests use query-token auth: ```text https://{baseUrl}/{instanceId}/{path}?token={token} ``` Pass the channel token as the first argument to generated API methods. ## Recipient addressing - `chatId`: `12020721369@c.us` (1:1) or `...@g.us` (group) - `phone`: country code + number, no `+` - Exactly one of `chatId` | `phone` per request ## 24-hour messaging window Free-form `sendMessage` only works inside the 24h customer-care window. Outside that window use `sendTemplate`. ## Client map ```ruby MessagingApi # send/list messages, media, interactive ProfileApi # getMe GroupsApi # create/list/manage groups FlowsApi # WhatsApp Flows lifecycle TemplatesApi # listTemplates ChannelApi # channel helpers CallingApi # calling WebhooksApi # webhooks ``` ## Package notes Gem name is `one_msg_sdk`. Module is `OneMsgSdk`. ## API reference API groups: calling, catalog, channel, flows, groups, messaging, profile, templates, users, webhooks. ### calling #### `getCallingSettings` Get calling settings Return WhatsApp Calling API settings for this channel (beta). Proxies upstream `GET /calling/settings`. **Prerequisites** - Number must be eligible for Meta Calling (Cloud API; not COEX) - Trial / `subscriptionBlocked` channels receive **403** plain text - You need your own WebRTC or SIP stack; 1msg is a **signaling proxy** only and does **not** store call history or recordings See the **Calling** tag overview for inbound/outbound flows and webhooks. ```yaml http: GET /callingSettings operationId: getCallingSettings clientGroup: calling responses: 200, 401, 500 ``` #### `initiateCall` Call action (connect / pre_accept / accept / reject / terminate) Perform a WhatsApp Calling action (beta). Proxies upstream `POST /calling/calls`. Despite the historical path name `/initiateCall`, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | `connect` | Outbound business → user | `to` + `session` (`sdp_type: offer`) | | `pre_accept` | Inbound (optional, reduces audio clipping) | `call_id` + `session` (`sdp_type: answer`) | | `accept` | Inbound answer | `call_id` + `session` (`sdp_type: answer`) | | `reject` | Decline inbound | `call_id` | | `terminate` | Hang up | `call_id` | **SDP / media (critical)** - `accept` / `pre_accept` require a **WebRTC-generated SDP answer**. - Do **not** send Meta's offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound `connect` webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (`138000`), no permission (`138006`), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / `subscriptionBlocked` → **403** plain text. Upstream failures often return HTTP 200 with `{ "response": { "error": "..." } }`. ```yaml http: POST /initiateCall operationId: initiateCall clientGroup: calling responses: 200, 401, 500 ``` #### `updateCallingSettings` Update calling settings Enable, disable, or update WhatsApp Calling settings (beta). Proxies upstream `POST /calling/settings`. Body is forwarded as-is (1msg does not validate fields). **Common fields under `calling`** - `status` (`ENABLED` | `DISABLED`) — required to turn calling on/off - `call_icon_visibility` (`DEFAULT` | `DISABLE_ALL`) — optional - `callback_permission_status` (`ENABLED` | `DISABLED`) — optional; when enabled, inbound user calls grant callback permission - `call_hours` — optional hours / timezone object - `sip` — optional SIP trunk; when SIP is ENABLED, Graph call actions and calling webhooks are not used - `srtp_key_exchange_protocol` (`DTLS` | `SDES`) — SDES only with SIP - `video.status` — optional Meta may accept only one feature group per request — prefer focused updates (e.g. enable status first, then SIP). Trial / `subscriptionBlocked` → **403** plain text. ```yaml http: POST /callingSettings operationId: updateCallingSettings clientGroup: calling responses: 200, 401, 500 ``` ### catalog #### `createCommerce` Set Commerce Settings Update catalog/cart commerce settings via the `params` object. - `params.is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `params.is_cart_enabled` — enable cart (`true`) or disable it (`false`). Blocked when the channel subscription limit is exceeded. Requires a commerce-capable channel (Cloud Functions `/commerceWAV2`). ```yaml http: POST /commerce operationId: createCommerce clientGroup: catalog responses: 200, 401, 500 ``` #### `getCommerce` Get Commerce Settings Returns catalog/cart commerce settings for the channel. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`). ```yaml http: GET /commerce operationId: getCommerce clientGroup: catalog responses: 200, 401, 500 ``` ### channel #### `getConversationalAutomation` Get conversational automation settings Get WhatsApp conversational components for the channel (welcome message, ice-breaker prompts, and slash commands). Proxies Meta/360dialog `GET /conversational_automation`. When `enable_welcome_message` is true and a user opens chat for the first time, Meta delivers a webhook message with `type: request_welcome`. The inbound formatter exposes that as `type: "request_welcome"` and `meta.request_welcome: true` so your webhook can send a custom welcome reply. ```yaml http: GET /conversationalAutomation operationId: getConversationalAutomation clientGroup: channel responses: 200, 401, 500 ``` #### `getStatus` Get channel status Returns WhatsApp Business API client connection status. ```yaml http: GET /status operationId: getStatus clientGroup: channel responses: 200, 401, 500 ``` #### `setConversationalAutomation` Set conversational automation settings Update WhatsApp conversational components. Allowed body fields (others are ignored): - `enable_welcome_message` (boolean) - `prompts` (string[], max 4, each ≤ 80 chars) - `commands` (`{ command_name, command_description }[]`) Proxies Meta/360dialog `POST /conversational_automation`. ```yaml http: POST /conversationalAutomation operationId: setConversationalAutomation clientGroup: channel responses: 200, 401, 500 ``` ### flows #### `createFlows` Create Flow ```yaml http: POST /flows operationId: createFlows clientGroup: flows responses: 200 ``` #### `createFlowsFlowIdDeprecate` Deprecate Flow ```yaml http: POST /flows/{flowId}/deprecate operationId: createFlowsFlowIdDeprecate clientGroup: flows responses: 200 ``` #### `createFlowsFlowIdPublish` Publish Flow ```yaml http: POST /flows/{flowId}/publish operationId: createFlowsFlowIdPublish clientGroup: flows responses: 200 ``` #### `deleteFlowsFlowId` Delete Flow ```yaml http: DELETE /flows/{flowId} operationId: deleteFlowsFlowId clientGroup: flows responses: 200 ``` #### `getFlowsFlowId` Get Flow Details ```yaml http: GET /flows/{flowId} operationId: getFlowsFlowId clientGroup: flows responses: 200 ``` #### `getFlowsFlowIdPreview` Preview Flow ```yaml http: GET /flows/{flowId}/preview operationId: getFlowsFlowIdPreview clientGroup: flows responses: 200 ``` #### `getWhatsappBusinessEncryption` Get business encryption public key Retrieve the WhatsApp business public key and signature status for this channel's phone number. Required before publishing or sending Flows that use data encryption. ```yaml http: GET /whatsapp_business_encryption operationId: getWhatsappBusinessEncryption clientGroup: flows responses: 200, 401, 500 ``` #### `listFlows` List Flows ```yaml http: GET /flows operationId: listFlows clientGroup: flows responses: 200 ``` #### `patchFlowsFlowIdAssets` Update Flow Structure ```yaml http: PATCH /flows/{flowId}/assets operationId: patchFlowsFlowIdAssets clientGroup: flows responses: 200 ``` #### `patchFlowsFlowIdMetadata` Update Flow Metadata ```yaml http: PATCH /flows/{flowId}/metadata operationId: patchFlowsFlowIdMetadata clientGroup: flows responses: 200 ``` #### `setWhatsappBusinessEncryption` Set business encryption public key Upload and sign a 2048-bit RSA business public key (PEM) for this channel's phone number. Meta requires a signed key before Flow publish/send. Only one active key per number; a new upload replaces the previous key. ```yaml http: POST /whatsapp_business_encryption operationId: setWhatsappBusinessEncryption clientGroup: flows responses: 200, 400, 401, 500 ``` ### groups #### `createGroups` Create Group ```yaml http: POST /groups operationId: createGroups clientGroup: groups responses: 200 ``` #### `createGroupsGroupId` Update Group Info ```yaml http: POST /groups/{groupId} operationId: createGroupsGroupId clientGroup: groups responses: 200 ``` #### `createGroupsGroupIdInvitelink` Reset Invite Link ```yaml http: POST /groups/{groupId}/inviteLink operationId: createGroupsGroupIdInvitelink clientGroup: groups responses: 200 ``` #### `deleteGroupsGroupId` Delete Group ```yaml http: DELETE /groups/{groupId} operationId: deleteGroupsGroupId clientGroup: groups responses: 200 ``` #### `getGroupsGroupId` Get Group Info ```yaml http: GET /groups/{groupId} operationId: getGroupsGroupId clientGroup: groups responses: 200 ``` #### `getGroupsGroupIdInvitelink` Get Invite Link ```yaml http: GET /groups/{groupId}/inviteLink operationId: getGroupsGroupIdInvitelink clientGroup: groups responses: 200 ``` #### `listGroups` Get Groups List ```yaml http: GET /groups operationId: listGroups clientGroup: groups responses: 200 ``` ### messaging #### `createReadMessage` Mark message as read ```yaml http: POST /readMessage operationId: createReadMessage clientGroup: messaging responses: 200, 401 ``` #### `createUploadMedia` Upload media ```yaml http: POST /uploadMedia operationId: createUploadMedia clientGroup: messaging responses: 200 ``` #### `deleteMedia` Delete media from WABA storage Delete previously uploaded media by numeric `mediaId` (from `/uploadMedia`). This is the canonical deletion endpoint and uses the REST `DELETE` verb on the media resource path. The older `POST /deleteMedia` is a deprecated alias. ```yaml http: DELETE /media/{mediaId} operationId: deleteMedia clientGroup: messaging responses: 200, 400, 401, 500 ``` #### `deleteMediaLegacy` Delete media from WABA storage (deprecated alias) **Deprecated.** Use `DELETE /media/{mediaId}` instead. This POST alias is kept for backward compatibility with earlier integrations. New integrations should call `DELETE /media/{mediaId}`: 1msg follows REST conventions for resource deletion going forward (delete a resource with the `DELETE` verb on its resource path). ```yaml http: POST /deleteMedia operationId: deleteMediaLegacy clientGroup: messaging responses: 200, 400, 401, 500 ``` #### `getMmLiteStatus` Get MM Lite availability and status ```yaml http: GET /mmLiteStatus operationId: getMmLiteStatus clientGroup: messaging responses: 200, 401, 500 ``` #### `listMessages` Get messages list ```yaml http: GET /messages operationId: listMessages clientGroup: messaging responses: 200 ``` #### `retrieveMedia` Retrieve uploaded media metadata Get WABA media URL and metadata by mediaId (from uploadMedia). The returned `url` is temporary and typically expires within ~5 minutes. ```yaml http: GET /retrieveMedia operationId: retrieveMedia clientGroup: messaging responses: 200, 400, 401, 500 ``` #### `sendAddressMessage` Send address request message Request shipping address from the user (WhatsApp interactive `address_message`). **India and Singapore only.** Requires: - Business WhatsApp number registered in that country - Recipient phone matching the country (`+91` ↔ `IN`, `+65` ↔ `SG`) Pass `country: "IN"` or `country: "SG"`. Eligibility is validated upstream; mismatches (e.g. Singapore phone with `country: "IN"`) return errors such as `Unsupported Interactive Message type` (HTTP 200 with `sent: false`). Optional action parameters: `values`, `saved_addresses`, `validation_errors`. ```yaml http: POST /sendAddressMessage operationId: sendAddressMessage clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendButton` Send Reply Buttons Message ```yaml http: POST /sendButton operationId: sendButton clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendCarousel` Send Carousel You can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons. ```yaml http: POST /sendCarousel operationId: sendCarousel clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendContact` Send a Contact ```yaml http: POST /sendContact operationId: sendContact clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendCtaUrl` Send CTA URL interactive message Send an interactive message with a single call-to-action URL button. ```yaml http: POST /sendCtaUrl operationId: sendCtaUrl clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendFile` Send a File Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. ```yaml http: POST /sendFile operationId: sendFile clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendFlow` Send WhatsApp Flow Message Send Interactive WhatsApp Flow message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. Use this method to send a published WhatsApp Flow as a service (interactive) message. If the 24-hour window is closed, send a template with a FLOW button via /sendTemplate. ```yaml http: POST /sendFlow operationId: sendFlow clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendList` Send List Message ```yaml http: POST /sendList operationId: sendList clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendLocation` Send a Location Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. ```yaml http: POST /sendLocation operationId: sendLocation clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendLocationRequest` Send Location Request Message ```yaml http: POST /sendLocationRequest operationId: sendLocationRequest clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendMessage` Send a Message Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. ```yaml http: POST /sendMessage operationId: sendMessage clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendOrderDetails` Send order details (India payments template) Send a WhatsApp **order details** payment / invoice message using a pre-approved **Utility** template that has an `ORDER_DETAILS` button. **India only** (WhatsApp Payments India). Requires: - India WhatsApp Business number - Commerce enabled on the channel (`GET`/`POST /commerce`) - Approved template with an `ORDER_DETAILS` button Use this method when you need structured fields (`order`, `referenceId`, `currency`, `paymentSettings`). The API appends a template button `sub_type: order_details` and sends via the same path as `POST /sendTemplate`. Works **outside the 24-hour session window** (template message). You can also send the same payload yourself with `POST /sendTemplate` by including a button component in `params`: ```json { "type": "button", "sub_type": "order_details", "index": 0, "parameters": [{ "type": "action", "action": { "order_details": { "reference_id": "order-123", "currency": "INR", "order": { "status": "pending", "items": [], "subtotal": { "offset": 100, "value": 50000 } } } } }] } ``` ```yaml http: POST /sendOrderDetails operationId: sendOrderDetails clientGroup: messaging responses: 200, 400, 401, 500 ``` #### `sendPaymentRequest` Send payment request (regional) Send a regional payment request interactive message (beta scaffold). `region` must be IN, SG, or BR. Payload shape follows Meta regional payments docs; verify on stage before production use. Full regional builders are not implemented yet. ```yaml http: POST /sendPaymentRequest operationId: sendPaymentRequest clientGroup: messaging responses: 200, 400, 401, 500 ``` #### `sendProduct` Send a Product ```yaml http: POST /sendProduct operationId: sendProduct clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendReaction` Send Reaction ```yaml http: POST /sendReaction operationId: sendReaction clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` #### `sendSticker` Send sticker message Send a WhatsApp sticker by mediaId or link URL. ```yaml http: POST /sendSticker operationId: sendSticker clientGroup: messaging responses: 200, 400, 401, 429, 500 ``` ### profile #### `getMe` Get Profile Info Get WhatsApp Business Account profile information ```yaml http: GET /me operationId: getMe clientGroup: profile responses: 200, 401, 500 ``` #### `updateMe` Update profile info Update WhatsApp Business Account profile fields. At least one of about, description, email, photo, address, vertical, websites is required. Blocked when the channel subscription limit is exceeded. ```yaml http: POST /me operationId: updateMe clientGroup: profile responses: 200, 401, 422, 500 ``` ### templates #### `addTemplate` Create message template ```yaml http: POST /addTemplate operationId: addTemplate clientGroup: templates responses: 200, 401, 500 ``` #### `listTemplates` Get templates list ```yaml http: GET /templates operationId: listTemplates clientGroup: templates responses: 200 ``` #### `removeTemplate` Remove message template ```yaml http: POST /removeTemplate operationId: removeTemplate clientGroup: templates responses: 200, 401, 500 ``` #### `sendTemplate` Send Template Message Send a WhatsApp template message (works outside the 24-hour session window). Supported `params` button `sub_type` values include: `url`, `quick_reply`, `copy_code` / `coupon_code`, `catalog`, `flow`, `limited_time_offer`, and **`order_details`** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button). For India order/invoice payments outside 24h, include a button component: ```json { "type": "button", "sub_type": "order_details", "index": 0, "parameters": [{ "type": "action", "action": { "order_details": { "reference_id": "...", "currency": "INR", "order": {} } } }] } ``` Convenience wrapper with structured fields: `POST /sendOrderDetails`. ```yaml http: POST /sendTemplate operationId: sendTemplate clientGroup: templates responses: 200 ``` ### users #### `blockUser` Block WhatsApp user ```yaml http: POST /blockUser operationId: blockUser clientGroup: users responses: 200, 400, 401, 500 ``` #### `listBlockedUsers` List blocked WhatsApp users Returns users currently blocked on this WhatsApp channel (WABA `GET /block_users`). Same channel token auth as `blockUser` / `unblockUser`. ```yaml http: GET /blockedUsers operationId: listBlockedUsers clientGroup: users responses: 200, 401, 500 ``` #### `unblockUser` Unblock WhatsApp user ```yaml http: POST /unblockUser operationId: unblockUser clientGroup: users responses: 200, 400, 401, 500 ``` ### webhooks #### `getWebhook` Get webhook URL Returns the configured client webhook URL for this channel. ```yaml http: GET /webhook operationId: getWebhook clientGroup: webhooks responses: 200, 401, 500 ``` #### `setWebhook` Set webhook URL Configure the client webhook URL for inbound events. WhatsApp **Calling** events (`field=calls`) are forwarded as passthrough payloads with `type: "calls"` and `instanceId` (connect / status / terminate). Call permission replies arrive on the normal messages path (`call_permission_reply`). Details: **Calling** tag. ```yaml http: POST /webhook operationId: setWebhook clientGroup: webhooks responses: 200, 401, 500 ``` ## Cookbook 1. Install the package from the registry above. 2. Set `MSG_API_TOKEN` and `MSG_INSTANCE_ID`. 3. Create the messaging client with `{baseUrl}/{instanceId}`. 4. Call `sendMessage` inside the 24h window, or `sendTemplate` outside it. 5. Use group/profile/flows/templates APIs for advanced workflows. ## FAQ **Where is the package?** See the registry link in the header table. **TypeScript has createClient — does this SDK?** Generated OpenAPI clients use per-API classes (`MessagingApi`, `ProfileApi`, …) instead of a facade. **Can I use this in a browser?** No — server-side only. Never expose tokens. ## Error handling | Code | Meaning | |------|---------| | 400 | Invalid parameters or body | | 401 | Invalid or missing token | | 429 | Rate limit exceeded | | 500 | Internal server error | ## Regeneration and versioning Docs regenerate with `node gen/generate-sdk-docs-langs.js`. Registry versions are immutable. ## License MIT © 1MSG
Parallel iteration methods (map, each, select, reject, find, flat_map, any?, all?, none?, count, reduce) with a configurable thread pool. Results maintain input order.
LangGraphRB is a Ruby library inspired by LangGraph for building stateful, multi-actor applications using directed graphs. It provides a framework for orchestrating complex workflows with support for parallel execution, checkpointing, human-in-the-loop interactions, and map-reduce operations.
https://github.com/zedbydade/ruby-map-reduce/blob/master/README.md
# foundationallib <h2>Finally, a cross-platform, portable, well-designed, secure, robust, maximally-efficient C foundational library — Making Engineering And Computing Fast, Secure, Responsive And Easy.</h2> <br> <h2><i>Library Uses - What It Does, What It Is, And What It Is A Solution For</i></h2> <ul class="features-list"> <li><strong>Enables better Engineering Solutions and Security broadly and foundationally where Software Creation or Development or Script Creation is concerned - whether this be on a local, business, governmental or international basis, and makes things easier - and Computing in General.</strong> Don't Reinvent the Wheel - Use Good Wheels - Be Safe And Secure.</li> <br> <li><strong>Enables a free-flowing dynamic computer usage that you need, deserve and should have, simply because you have a computer. With full speed and with robustness. You deserve to be able to use your computer wholly and fully, with proper and fast operations.</strong></li> <br><li><strong>Enables flexibility and power - makes C accessible to the masses (and faster and more secure) with easy usage and strives to bring people up, not degrade the character or actions of people.</strong> This is a fundamental and unequivocal philosophy difference between this library and many subsections of Software Engineering and the mainstream engineering establishment. For instance, in Python, you cannot read a file easily – you have to read it line-by-line or open a file, read the lines, then close it. With this library, you can efficiently read 10,000 files in one function call. This library gives power. Any common operation, there ought to be a powerful function for.<br><br>We should not bitch around with assembly when we don't want to; we should also have full speed. Some old "solutions" deliver neither, then culturally degrade programmers because their tools are bad - actually, it just degrades programmers, and gives them bad tools. COBOL is an example ...<br><br>Human technology is about empowerment – people must fight for it to be empowerment, we don't have time to have AI systems kill us because we want to have bad tools and be weak. We must fight.</li> </ul> <br> <ul> <h2><i>About Foundationallib</i></h2> <li>→<strong>Cross platform</strong> - works perfectly in embedded, server, desktop, and all platforms - tested for Windows and UNIX - 64-bit and 32-bit, includes a 3-aspect test suite, with more to come.</li> <li>→<strong>Bug free. Reliable. Dependable. Secure. Tested well.</strong></li> <li>→<strong>Zero Overhead</strong> - Only 1 byte due to the power of the error handling, can be configured will full power.</li> <li>→<strong>Static Inline Functions if you want them</strong> (optional) - Eliminating function call overhead to 0 if you wish, for improved performance.</li> <li>→<strong>Custom allocators</strong> - if you want it.</li> <li>→<strong>Custom error handling</strong> - if you want it.</li> <li>→<strong>Safe functions</strong> warn the programmer about NULL values and unused return values. Can be configured to not compile if not Secure. Optional null-check macros in every library function. Does not use any of <code>"gets", "fgets", "strcpy", "strcat", "sprintf", "vsprintf", "scanf", "fscanf", "system", "chown", "chmod", "chgrp", "alloca", "execl", "execle", "execlp", "execv", "execve", "execvp", "bcopy", "bzero"</code>. You can configure it to never use any unsafe functions.</li> <li>→<strong>Portable</strong> - works on all platforms, using platform specific features (using #ifdefs) to make functions better and faster.</li> <li>→<strong>Multithreading support</strong> (optional), with list_comprehension_multithreaded (accepts any number of threads, works in parallel using portable C11 threads)</li> <li>→<strong>Networking support</strong> (optional), using libcurl - making it extremely easy to download websites and arrays of websites - features other languages do not have.</li> <li>→Very good and thorough <strong>Error Handling</strong> and <strong>allocation overflow</strong> checking (good for <strong>Security and Robustness</strong>) in the functions. Allows the programmer to dynamically choose to catch all errors in the functions with a handler (default or custom), or to ignore them. No need to ALWAYS say "if (.....) if you don't want to. Can be changed at runtime.</li> <li>→<strong>Public Domain</strong> so you make the code how you want. (No need to "propitiate" to some "god" of some library).</li> <li>→<strong>Minimal abstractions or indirection of any kind or needless slow things that complicate things</strong> - macros, namespace collision, typedefs, structs, object-orientation messes, slow compilation times, bloat, etc., etc.</li> <li>→<strong>No namespace pollution</strong> - you can generate your <span style=font-style:normal;><b>own version</b></span> with any prefix you like!</li> <li>→<strong>Relies <span style=font-style:normal;>minimally</span> on C libraries - it can be fully decoupled from LIB C and can be statically linked.</strong></li> <li>→<span style=font-style:normal;><b>Very small</b></span> - 13K Lines of Code (including Doxygen comments and following of Best Practices)</li> <li>→<strong>No Linkage Issues or dependency hell</strong></li> <li>→<strong>Thorough and clear documentation</strong>, with examples of usage.</li> <li>→<strong>No licensing restrictions whatsoever - use it for your engineering project, your startup, your Fortune 500 company, your personal project, your throw-away script, your government.</strong></li> <li>→<strong>Makes C like Python or Perl or Ruby in many ways - or more easy</strong></li> <li>→<strong>Easy Straightforward Transpilation Support</strong> - to make current code, much faster - all without any bloat (See transpile_slow_scripting_into_c.rb). <li><h4>In many cases, there is now a direct mapping of functions from other languages into optimized C. See the example script in this repository. This makes optimizing your Python / Perl / Ruby / PHP etc. script very easy, either manually or through the use of AI.</h4></li> </ul> </p> </div> <div class=pane style='border: 0;border-right: 1px dotted rgb(200, 200, 200); background-color: rgb(255, 255, 190);'> <div class="library-details"><h2 style=color:green;><i>Foundationallib Features</i></h2> <p class=feature> <strong>Functional Programming Features</strong> - <code>map, reduce, filter,</code> List Comprehensions in C and much more!</p> <p class=feature><strong>Expands C's Primitives for easy manipulation of data types</strong> such as Arrays, Strings, <code>Dict</code>, <code>Set</code>, <code>FrozenDict</code>, <code>FrozenSet</code> - <strong>and enables easy manipulation, modification, alteration, comparison, sorting, counting, IO (printing) and duplication of these at a very comfortable level</strong> - something very, very rare in C or C++, <i>all without any overhead.</i></p> <p class=feature><strong>More comfortable IO</strong> - read and write entire files with ease, and convert complex types into strings or print them on the screen with ease. </p> <p class=feature><strong>A powerful general purpose Foundational Library</strong> - <i>which has anything and everything you need</i> - from <code>replace_all()</code> to <code>replace_memory()</code> to <code>find_last_of()</code> to to <code>list_comprehension()</code> to <code>shellescape()</code> to <code>read_file_into_string()</code> to <code>string_to_json()</code> to <code>string_to_uppercase()</code> to <code>to_title_case()</code> to <code>read_file_into_array()</code> to <code>read_files_into_array()</code> to <code>map()</code> to <code>reduce()</code> to <code>filter()</code> to <code>list_comprehension_multithreaded()</code> to <code>frozen_dict_new_instance()</code> to <code>backticks()</code> - everything you would want to make quick and optimally efficient C programs, this has it.</p> <div style='height: 1px; border: 0;border-bottom: 1px dashed rgb(200, 200, 200);'></div> <p class=performance><span>Helps to make programs hundreds of times faster than other languages with similar ease of creation.</span> <hr> <p class=feature><strong>Easily take advantage of CPU cores with list_comprehension_multithreaded()</strong>.<br><br>You can specify the number of threads, the transform and the filter functions, and this will transform your data - all in parallel. Don't have a multithreaded environment? Then disable it (set the flag).</p> <hr> <h3>You don't want to be reinventing the wheel and hoping that your memory allocation is secure enough - and then failing. <strong>Security Is Paramount.</strong></h3> <h3>You don't want to be waiting <span style='color:rgb(240, 0, 0);'>a day</span> for an operation to complete when it could take <span style='color:rgb(30, 30, 255);'>less than an hour</span>.</h3> <br><p>This library is founded on very strong and unequivocal goals and philosophy. In fact, I have written many articles about the foundation of this library and more relevantly the broader context. See the Articles folder - for some of the foundation of this library.</p> <br><p>This library is an ideal and a dream - not just a Software Library. As such, I would highly suggest that you support me in this mission. Even if it's different from the status quo. Are you a Rust or Zig fan? Then make a Rust or Zig version of this ideal. Let's go. Give me an email.</p> </div> </div> <br> No Copyright - Public Domain - 2023, Gregory Cohen <gregorycohennew@gmail.com> DONATION REQUEST: If this free software has helped you and you find it valuable, please consider making a donation to support the ongoing development and maintenance of this project. Your contribution helps ensure the availability of this library to the community and encourages further improvements. Donations can be made at: https://www.paypal.com/paypalme/cfoundationallib Note: The best way to contact me is through email, not social media. Please feel very free to email me if you want to express feedback, suggest an improvement, desire to collaborate on this free and open source project, want to support me, or want to create something great. Complacency and obstructionism and whining are not tolerated. I desire to make this library the best theoretically possible, so please, let us connect. <h1>This code is in the public domain, fully. You can do whatever you want with it. See docs.html for API reference.  </h1> <h1>Here's some examples of some things you can do easily with Foundationallib.<br><br> <h3>Use it for scripting purposes...</h3> </h1>  <h1>Take control of the Web - in C.<br><br></h1> 
# foundationallib <h2>Finally, a cross-platform, portable, well-designed, secure, robust, maximally-efficient C foundational library — Making Engineering And Computing Fast, Secure, Responsive And Easy.</h2> <br> <ul class="features-list"> <li><strong>Enables better Engineering Solutions and Security broadly and foundationally where Software Creation or Development or Script Creation is concerned - whether this be on a local, business, governmental or international basis, and makes things easier - and Computing in General.</strong> Don't Reinvent the Wheel - Use Good Wheels - Be Safe And Secure.</li> <br> <li><strong>Enables a free-flowing dynamic computer usage that you need, deserve and should have, simply because you have a computer. With full speed and with robustness. You deserve to be able to use your computer wholly and fully, with proper and fast operations.</strong></li> <br><li><strong>Enables flexibility and power - makes C accessible to the masses (and faster and more secure) with easy usage and strives to bring people up, not degrade the character or actions of people.</strong> This is a fundamental and unequivocal philosophy difference between this library and many subsections of Software Engineering and the mainstream engineering establishment. For instance, in Python, you cannot read a file easily – you have to read it line-by-line or open a file, read the lines, then close it. With this library, you can efficiently read 10,000 files in one function call. This library gives power. Any common operation, there ought to be a powerful function for.<br><br>We should not bitch around with assembly when we don't want to; we should also have full speed. Some old "solutions" deliver neither, then culturally degrade programmers because their tools are bad - actually, it just degrades programmers, and gives them bad tools. COBOL is an example ...<br><br>Human technology is about empowerment – people must fight for it to be empowerment, we don't have time to have AI systems kill us because we want to have bad tools and be weak. We must fight.</li> </ul> <br> <ul> <h2>About Foundationallib</h2> <li>→<strong>Cross platform</strong> - works perfectly in embedded, server, desktop, and all platforms - tested for Windows and UNIX - 64-bit and 32-bit, includes a 3-aspect test suite, with more to come.</li> <li>→<strong>Bug free. Reliable. Dependable. Secure. Tested well.</strong></li> <li>→<strong>Zero Overhead</strong> - Only 1 byte due to the power of the error handling, can be configured will full power.</li> <li>→<strong>Static Inline Functions if you want them</strong> (optional) - Eliminating function call overhead to 0 if you wish, for improved performance.</li> <li>→<strong>Custom allocators</strong> - if you want it.</li> <li>→<strong>Custom error handling</strong> - if you want it.</li> <li>→<strong>Safe functions</strong> warn the programmer about NULL values and unused return values. Can be configured to not compile if not Secure. Optional null-check macros in every library function. Does not use any of <code>"gets", "fgets", "strcpy", "strcat", "sprintf", "vsprintf", "scanf", "fscanf", "system", "chown", "chmod", "chgrp", "alloca", "execl", "execle", "execlp", "execv", "execve", "execvp", "bcopy", "bzero"</code>. You can configure it to never use any unsafe functions.</li> <li>→<strong>Portable</strong> - works on all platforms, using platform specific features (using #ifdefs) to make functions better and faster.</li> <li>→<strong>Multithreading support</strong> (optional), with list_comprehension_multithreaded (accepts any number of threads, works in parallel using portable C11 threads)</li> <li>→<strong>Networking support</strong> (optional), using libcurl - making it extremely easy to download websites and arrays of websites - features other languages do not have.</li> <li>→Very good and thorough <strong>Error Handling</strong> and <strong>allocation overflow</strong> checking (good for <strong>Security and Robustness</strong>) in the functions. Allows the programmer to dynamically choose to catch all errors in the functions with a handler (default or custom), or to ignore them. No need to ALWAYS say "if (.....) if you don't want to. Can be changed at runtime.</li> <li>→<strong>Public Domain</strong> so you make the code how you want. (No need to "propitiate" to some "god" of some library).</li> <li>→<strong>Minimal abstractions or indirection of any kind or needless slow things that complicate things</strong> - macros, namespace collision, typedefs, structs, object-orientation messes, slow compilation times, bloat, etc., etc.</li> <li>→<strong>No namespace pollution</strong> - you can generate your <span style=font-style:normal;><b>own version</b></span> with any prefix you like!</li> <li>→<strong>Relies <span style=font-style:normal;>minimally</span> on C libraries - it can be fully decoupled from LIB C and can be statically linked.</strong></li> <li>→<span style=font-style:normal;><b>Very small</b></span> - 13K Lines of Code (including Doxygen comments and following of Best Practices)</li> <li>→<strong>No Linkage Issues or dependency hell</strong></li> <li>→<strong>Thorough and clear documentation</strong>, with examples of usage.</li> <li>→<strong>No licensing restrictions whatsoever - use it for your engineering project, your startup, your Fortune 500 company, your personal project, your throw-away script, your government.</strong></li> <li>→<strong>Makes C like Python or Perl or Ruby in many ways - or more easy</strong></li> <li>→<strong>Easy Straightforward Transpilation Support</strong> - to make current code, much faster - all without any bloat (See transpile_slow_scripting_into_c.rb). <li><h4>In many cases, there is now a direct mapping of functions from other languages into optimized C. See the example script in this repository. This makes optimizing your Python / Perl / Ruby / PHP etc. script very easy, either manually or through the use of AI.</h4></li> </ul> </p> </div> <div class=pane style='border: 0;border-right: 1px dotted rgb(200, 200, 200); background-color: rgb(255, 255, 190);'> <div class="library-details"><h2 style=color:green;>Foundationallib Features</h2> <p class=feature> <strong>Functional Programming Features</strong> - <code>map, reduce, filter,</code> List Comprehensions in C and much more!</p> <p class=feature><strong>Expands C's Primitives for easy manipulation of data types</strong> such as Arrays, Strings, <code>Dict</code>, <code>Set</code>, <code>FrozenDict</code>, <code>FrozenSet</code> - <strong>and enables easy manipulation, modification, alteration, comparison, sorting, counting, IO (printing) and duplication of these at a very comfortable level</strong> - something very, very rare in C or C++, <i>all without any overhead.</i></p> <p class=feature><strong>More comfortable IO</strong> - read and write entire files with ease, and convert complex types into strings or print them on the screen with ease. </p> <p class=feature><strong>A powerful general purpose Foundational Library</strong> - <i>which has anything and everything you need</i> - from <code>replace_all()</code> to <code>replace_memory()</code> to <code>find_last_of()</code> to to <code>list_comprehension()</code> to <code>shellescape()</code> to <code>read_file_into_string()</code> to <code>string_to_json()</code> to <code>string_to_uppercase()</code> to <code>to_title_case()</code> to <code>read_file_into_array()</code> to <code>read_files_into_array()</code> to <code>map()</code> to <code>reduce()</code> to <code>filter()</code> to <code>list_comprehension_multithreaded()</code> to <code>frozen_dict_new_instance()</code> to <code>backticks()</code> - everything you would want to make quick and optimally efficient C programs, this has it.</p> <div style='height: 1px; border: 0;border-bottom: 1px dashed rgb(200, 200, 200);'></div> <p class=performance><span>Helps to make programs hundreds of times faster than other languages with similar ease of creation.</span> <hr> <p class=feature><strong>Easily take advantage of CPU cores with list_comprehension_multithreaded()</strong>.<br><br>You can specify the number of threads, the transform and the filter functions, and this will transform your data - all in parallel. Don't have a multithreaded environment? Then disable it (set the flag).</p> <hr> <h3>You don't want to be reinventing the wheel and hoping that your memory allocation is secure enough - and then failing. <strong>Security Is Paramount.</strong></h3> <h3>You don't want to be waiting <span style='color:rgb(240, 0, 0);'>a day</span> for an operation to complete when it could take <span style='color:rgb(30, 30, 255);'>less than an hour</span>.</h3> <br><p>This library is founded on very strong and unequivocal goals and philosophy. In fact, I have written many articles about the foundation of this library and more relevantly the broader context. See the Articles folder - for some of the foundation of this library.</p> <br><p>This library is an ideal and a dream - not just a Software Library. As such, I would highly suggest that you support me in this mission. Even if it's different from the status quo. Are you a Rust or Zig fan? Then make a Rust or Zig version of this ideal. Let's go. Give me an email.</p> </div> </div> <br> No Copyright - Public Domain - 2023, Gregory Cohen <gregorycohennew@gmail.com> DONATION REQUEST: If this free software has helped you and you find it valuable, please consider making a donation to support the ongoing development and maintenance of this project. Your contribution helps ensure the availability of this library to the community and encourages further improvements. Donations can be made at: https://www.paypal.com/paypalme/cfoundationallib Note: The best way to contact me is through email, not social media. Please feel very free to email me if you want to express feedback, suggest an improvement, desire to collaborate on this free and open source project, want to support me, or want to create something great. Complacency and obstructionism and whining are not tolerated. I desire to make this library the best theoretically possible, so please, let us connect. <pre><code> Mirror Links Blog - https://foundationallib.wordpress.com/ Github - https://github.com/gregoryc/foundationallib Ruby Gem Mirror - https://rubygems.org/gems/foundational_lib Ruby Gem Mirror - https://rubygems.org/gems/foundational_lib2 Library Instagram - https://www.instagram.com/foundationallib Google Drive Mirrors ZIP - https://drive.google.com/file/d/1bK2njCRsH4waTm4LP16sloPQawk7JIR5/view?usp=sharing TAR.GZ - https://drive.google.com/file/d/1RCA1yy9R3cEqI_X9Lv0fxqh-zgNCK005/view?usp=sharing TAR.BZ2 - https://drive.google.com/file/d/1ljdlI_fEnMS_X5WmuhI1qavhgseWlD5j/view?usp=sharing </code></pre> <h1>This code is in the public domain, fully. You can do whatever you want with it. See docs.html for API reference.  </h1> <h1>Here's some examples of some things you can do easily with Foundationallib.<br><br> <h3>Use it for scripting purposes...</h3> </h1>  <h1>Take control of the Web - in C.<br><br></h1> 