getricky 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +136 -2
  3. package/dist/cjs/client.d.ts +51 -0
  4. package/dist/cjs/client.js +124 -0
  5. package/dist/cjs/errors.d.ts +35 -0
  6. package/dist/cjs/errors.js +55 -0
  7. package/dist/cjs/generated/client/client.gen.d.ts +2 -0
  8. package/dist/cjs/generated/client/client.gen.js +220 -0
  9. package/dist/cjs/generated/client/index.d.ts +10 -0
  10. package/dist/cjs/generated/client/index.js +17 -0
  11. package/dist/cjs/generated/client/types.gen.d.ts +120 -0
  12. package/dist/cjs/generated/client/types.gen.js +3 -0
  13. package/dist/cjs/generated/client/utils.gen.d.ts +37 -0
  14. package/dist/cjs/generated/client/utils.gen.js +239 -0
  15. package/dist/cjs/generated/client.gen.d.ts +12 -0
  16. package/dist/cjs/generated/client.gen.js +6 -0
  17. package/dist/cjs/generated/core/auth.gen.d.ts +25 -0
  18. package/dist/cjs/generated/core/auth.gen.js +18 -0
  19. package/dist/cjs/generated/core/bodySerializer.gen.d.ts +25 -0
  20. package/dist/cjs/generated/core/bodySerializer.gen.js +60 -0
  21. package/dist/cjs/generated/core/params.gen.d.ts +43 -0
  22. package/dist/cjs/generated/core/params.gen.js +112 -0
  23. package/dist/cjs/generated/core/pathSerializer.gen.d.ts +33 -0
  24. package/dist/cjs/generated/core/pathSerializer.gen.js +115 -0
  25. package/dist/cjs/generated/core/queryKeySerializer.gen.d.ts +18 -0
  26. package/dist/cjs/generated/core/queryKeySerializer.gen.js +98 -0
  27. package/dist/cjs/generated/core/serverSentEvents.gen.d.ts +71 -0
  28. package/dist/cjs/generated/core/serverSentEvents.gen.js +135 -0
  29. package/dist/cjs/generated/core/types.gen.d.ts +83 -0
  30. package/dist/cjs/generated/core/types.gen.js +3 -0
  31. package/dist/cjs/generated/core/utils.gen.d.ts +19 -0
  32. package/dist/cjs/generated/core/utils.gen.js +93 -0
  33. package/dist/cjs/generated/idempotency.gen.d.ts +2 -0
  34. package/dist/cjs/generated/idempotency.gen.js +16 -0
  35. package/dist/cjs/generated/index.d.ts +2 -0
  36. package/dist/cjs/generated/index.js +6 -0
  37. package/dist/cjs/generated/sdk.gen.d.ts +259 -0
  38. package/dist/cjs/generated/sdk.gen.js +493 -0
  39. package/dist/cjs/generated/types.gen.d.ts +2557 -0
  40. package/dist/cjs/generated/types.gen.js +3 -0
  41. package/dist/cjs/index.d.ts +7 -0
  42. package/dist/cjs/index.js +12 -0
  43. package/dist/cjs/package.json +1 -0
  44. package/dist/cjs/webhooks.d.ts +25 -0
  45. package/dist/cjs/webhooks.js +59 -0
  46. package/dist/esm/client.d.ts +51 -0
  47. package/dist/esm/client.js +120 -0
  48. package/dist/esm/errors.d.ts +35 -0
  49. package/dist/esm/errors.js +49 -0
  50. package/dist/esm/generated/client/client.gen.d.ts +2 -0
  51. package/dist/esm/generated/client/client.gen.js +216 -0
  52. package/dist/esm/generated/client/index.d.ts +10 -0
  53. package/dist/esm/generated/client/index.js +6 -0
  54. package/dist/esm/generated/client/types.gen.d.ts +120 -0
  55. package/dist/esm/generated/client/types.gen.js +2 -0
  56. package/dist/esm/generated/client/utils.gen.d.ts +37 -0
  57. package/dist/esm/generated/client/utils.gen.js +228 -0
  58. package/dist/esm/generated/client.gen.d.ts +12 -0
  59. package/dist/esm/generated/client.gen.js +3 -0
  60. package/dist/esm/generated/core/auth.gen.d.ts +25 -0
  61. package/dist/esm/generated/core/auth.gen.js +14 -0
  62. package/dist/esm/generated/core/bodySerializer.gen.d.ts +25 -0
  63. package/dist/esm/generated/core/bodySerializer.gen.js +57 -0
  64. package/dist/esm/generated/core/params.gen.d.ts +43 -0
  65. package/dist/esm/generated/core/params.gen.js +109 -0
  66. package/dist/esm/generated/core/pathSerializer.gen.d.ts +33 -0
  67. package/dist/esm/generated/core/pathSerializer.gen.js +106 -0
  68. package/dist/esm/generated/core/queryKeySerializer.gen.d.ts +18 -0
  69. package/dist/esm/generated/core/queryKeySerializer.gen.js +92 -0
  70. package/dist/esm/generated/core/serverSentEvents.gen.d.ts +71 -0
  71. package/dist/esm/generated/core/serverSentEvents.gen.js +132 -0
  72. package/dist/esm/generated/core/types.gen.d.ts +83 -0
  73. package/dist/esm/generated/core/types.gen.js +2 -0
  74. package/dist/esm/generated/core/utils.gen.d.ts +19 -0
  75. package/dist/esm/generated/core/utils.gen.js +87 -0
  76. package/dist/esm/generated/idempotency.gen.d.ts +2 -0
  77. package/dist/esm/generated/idempotency.gen.js +13 -0
  78. package/dist/esm/generated/index.d.ts +2 -0
  79. package/dist/esm/generated/index.js +2 -0
  80. package/dist/esm/generated/sdk.gen.d.ts +259 -0
  81. package/dist/esm/generated/sdk.gen.js +489 -0
  82. package/dist/esm/generated/types.gen.d.ts +2557 -0
  83. package/dist/esm/generated/types.gen.js +2 -0
  84. package/dist/esm/index.d.ts +7 -0
  85. package/dist/esm/index.js +3 -0
  86. package/dist/esm/webhooks.d.ts +25 -0
  87. package/dist/esm/webhooks.js +56 -0
  88. package/package.json +64 -4
@@ -0,0 +1,19 @@
1
+ import type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';
2
+ export interface PathSerializer {
3
+ path: Record<string, unknown>;
4
+ url: string;
5
+ }
6
+ export declare const PATH_PARAM_RE: RegExp;
7
+ export declare const defaultPathSerializer: ({ path, url: _url }: PathSerializer) => string;
8
+ export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
9
+ baseUrl?: string;
10
+ path?: Record<string, unknown>;
11
+ query?: Record<string, unknown>;
12
+ querySerializer: QuerySerializer;
13
+ url: string;
14
+ }) => string;
15
+ export declare function getValidRequestBody(options: {
16
+ body?: unknown;
17
+ bodySerializer?: BodySerializer | null;
18
+ serializedBody?: unknown;
19
+ }): unknown;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // This file is auto-generated by @hey-api/openapi-ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getUrl = exports.defaultPathSerializer = exports.PATH_PARAM_RE = void 0;
5
+ exports.getValidRequestBody = getValidRequestBody;
6
+ const pathSerializer_gen_js_1 = require("./pathSerializer.gen.js");
7
+ exports.PATH_PARAM_RE = /\{[^{}]+\}/g;
8
+ const defaultPathSerializer = ({ path, url: _url }) => {
9
+ let url = _url;
10
+ const matches = _url.match(exports.PATH_PARAM_RE);
11
+ if (matches) {
12
+ for (const match of matches) {
13
+ let explode = false;
14
+ let name = match.substring(1, match.length - 1);
15
+ let style = 'simple';
16
+ if (name.endsWith('*')) {
17
+ explode = true;
18
+ name = name.substring(0, name.length - 1);
19
+ }
20
+ if (name.startsWith('.')) {
21
+ name = name.substring(1);
22
+ style = 'label';
23
+ }
24
+ else if (name.startsWith(';')) {
25
+ name = name.substring(1);
26
+ style = 'matrix';
27
+ }
28
+ const value = path[name];
29
+ if (value === undefined || value === null) {
30
+ continue;
31
+ }
32
+ if (Array.isArray(value)) {
33
+ url = url.replace(match, (0, pathSerializer_gen_js_1.serializeArrayParam)({ explode, name, style, value }));
34
+ continue;
35
+ }
36
+ if (typeof value === 'object') {
37
+ url = url.replace(match, (0, pathSerializer_gen_js_1.serializeObjectParam)({
38
+ explode,
39
+ name,
40
+ style,
41
+ value: value,
42
+ valueOnly: true,
43
+ }));
44
+ continue;
45
+ }
46
+ if (style === 'matrix') {
47
+ url = url.replace(match, `;${(0, pathSerializer_gen_js_1.serializePrimitiveParam)({
48
+ name,
49
+ value: value,
50
+ })}`);
51
+ continue;
52
+ }
53
+ const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
54
+ url = url.replace(match, replaceValue);
55
+ }
56
+ }
57
+ return url;
58
+ };
59
+ exports.defaultPathSerializer = defaultPathSerializer;
60
+ const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
61
+ const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
62
+ let url = (baseUrl ?? '') + pathUrl;
63
+ if (path) {
64
+ url = (0, exports.defaultPathSerializer)({ path, url });
65
+ }
66
+ let search = query ? querySerializer(query) : '';
67
+ if (search.startsWith('?')) {
68
+ search = search.substring(1);
69
+ }
70
+ if (search) {
71
+ url += `?${search}`;
72
+ }
73
+ return url;
74
+ };
75
+ exports.getUrl = getUrl;
76
+ function getValidRequestBody(options) {
77
+ const hasBody = options.body !== undefined;
78
+ const isSerializedBody = hasBody && options.bodySerializer;
79
+ if (isSerializedBody) {
80
+ if ('serializedBody' in options) {
81
+ const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
82
+ return hasSerializedBody ? options.serializedBody : null;
83
+ }
84
+ // not all clients implement a serializedBody property (i.e., client-axios)
85
+ return options.body !== '' ? options.body : null;
86
+ }
87
+ // plain/text body
88
+ if (hasBody) {
89
+ return options.body;
90
+ }
91
+ // no body was provided
92
+ return undefined;
93
+ }
@@ -0,0 +1,2 @@
1
+ /** `METHOD /path/{template}` of every write that accepts an `Idempotency-Key` header. */
2
+ export declare const idempotentOperations: ReadonlySet<string>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // This file is auto-generated by scripts/generate.mjs
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.idempotentOperations = void 0;
5
+ /** `METHOD /path/{template}` of every write that accepts an `Idempotency-Key` header. */
6
+ exports.idempotentOperations = new Set([
7
+ 'PATCH /contacts/{contact_id}',
8
+ 'PATCH /conversations/{conversation_id}/assignment',
9
+ 'POST /contacts',
10
+ 'POST /contacts/{contact_id}/notes',
11
+ 'POST /conversations',
12
+ 'POST /conversations/{conversation_id}/close',
13
+ 'POST /conversations/{conversation_id}/messages',
14
+ 'POST /conversations/{conversation_id}/reopen',
15
+ 'POST /tags',
16
+ ]);
@@ -0,0 +1,2 @@
1
+ export { type Options, RickyApi } from './sdk.gen.js';
2
+ export type { AddContactNote, AddContactNoteData, AddContactNoteError, AddContactNoteErrors, AddContactNoteResponse, AddContactNoteResponses, AssignConversation, AssignConversationData, AssignConversationError, AssignConversationErrors, AssignConversationResponse, AssignConversationResponses, Channel, ClientOptions, CloseConversation, CloseConversationData, CloseConversationError, CloseConversationErrors, CloseConversationResponse, CloseConversationResponses, Contact, ContactField, ContactIdentity, Conversation, CreateContact, CreateContactData, CreateContactError, CreateContactErrors, CreateContactResponse, CreateContactResponses, CreatedWebhook, CreateTag, CreateTagData, CreateTagError, CreateTagErrors, CreateTagResponse, CreateTagResponses, CreateWebhook, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookResponse, CreateWebhookResponses, DisableWebhookData, DisableWebhookError, DisableWebhookErrors, DisableWebhookResponse, DisableWebhookResponses, Error, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetConversationData, GetConversationError, GetConversationErrors, GetConversationResponse, GetConversationResponses, GetMessageData, GetMessageError, GetMessageErrors, GetMessageResponse, GetMessageResponses, GetSendData, GetSendError, GetSendErrors, GetSendResponse, GetSendResponses, IdempotencyKey, ListChannelsData, ListChannelsError, ListChannelsErrors, ListChannelsResponse, ListChannelsResponses, ListContactFieldsData, ListContactFieldsError, ListContactFieldsErrors, ListContactFieldsResponse, ListContactFieldsResponses, ListContactsData, ListContactsError, ListContactsErrors, ListContactsResponse, ListContactsResponses, ListConversationsData, ListConversationsError, ListConversationsErrors, ListConversationsResponse, ListConversationsResponses, ListMembersData, ListMembersError, ListMembersErrors, ListMembersResponse, ListMembersResponses, ListMessagesData, ListMessagesError, ListMessagesErrors, ListMessagesResponse, ListMessagesResponses, ListTagsData, ListTagsError, ListTagsErrors, ListTagsResponse, ListTagsResponses, ListTemplatesData, ListTemplatesError, ListTemplatesErrors, ListTemplatesResponse, ListTemplatesResponses, ListWebhookDeliveriesData, ListWebhookDeliveriesError, ListWebhookDeliveriesErrors, ListWebhookDeliveriesResponse, ListWebhookDeliveriesResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponses, MediaMessage, Member, Message, ReopenConversationData, ReopenConversationError, ReopenConversationErrors, ReopenConversationResponse, ReopenConversationResponses, RetryWebhookDeliveryData, RetryWebhookDeliveryError, RetryWebhookDeliveryErrors, RetryWebhookDeliveryResponse, RetryWebhookDeliveryResponses, RotateWebhookSecret, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, Send, SendMessage, SendMessageData, SendMessageError, SendMessageErrors, SendMessageResponse, SendMessageResponses, StartConversation, StartConversationData, StartConversationError, StartConversationErrors, StartConversationResponse, StartConversationResponses, Tag, Template, TemplateMessage, TestWebhookData, TestWebhookError, TestWebhookErrors, TestWebhookResponse, TestWebhookResponses, UpdateContact, UpdateContactData, UpdateContactError, UpdateContactErrors, UpdateContactResponse, UpdateContactResponses, Webhook, WebhookContactCreatedWebhookPayload, WebhookContactCreatedWebhookRequest, WebhookContactUpdatedWebhookPayload, WebhookContactUpdatedWebhookRequest, WebhookConversationAssignmentChangedWebhookPayload, WebhookConversationAssignmentChangedWebhookRequest, WebhookConversationClosedWebhookPayload, WebhookConversationClosedWebhookRequest, WebhookConversationOpenedWebhookPayload, WebhookConversationOpenedWebhookRequest, WebhookDelivery, WebhookEvent, WebhookMessageDeliveredWebhookPayload, WebhookMessageDeliveredWebhookRequest, WebhookMessageFailedWebhookPayload, WebhookMessageFailedWebhookRequest, WebhookMessageReadWebhookPayload, WebhookMessageReadWebhookRequest, WebhookMessageReceivedWebhookPayload, WebhookMessageReceivedWebhookRequest, WebhookMessageSentWebhookPayload, WebhookMessageSentWebhookRequest, Webhooks, WebhookTestResult, WebhookWebhookTestWebhookPayload, WebhookWebhookTestWebhookRequest } from './types.gen.js';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // This file is auto-generated by @hey-api/openapi-ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.RickyApi = void 0;
5
+ var sdk_gen_js_1 = require("./sdk.gen.js");
6
+ Object.defineProperty(exports, "RickyApi", { enumerable: true, get: function () { return sdk_gen_js_1.RickyApi; } });
@@ -0,0 +1,259 @@
1
+ import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
2
+ import type { AddContactNoteData, AddContactNoteErrors, AddContactNoteResponses, AssignConversationData, AssignConversationErrors, AssignConversationResponses, CloseConversationData, CloseConversationErrors, CloseConversationResponses, CreateContactData, CreateContactErrors, CreateContactResponses, CreateTagData, CreateTagErrors, CreateTagResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, DisableWebhookData, DisableWebhookErrors, DisableWebhookResponses, GetContactData, GetContactErrors, GetContactResponses, GetConversationData, GetConversationErrors, GetConversationResponses, GetMessageData, GetMessageErrors, GetMessageResponses, GetSendData, GetSendErrors, GetSendResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListContactFieldsData, ListContactFieldsErrors, ListContactFieldsResponses, ListContactsData, ListContactsErrors, ListContactsResponses, ListConversationsData, ListConversationsErrors, ListConversationsResponses, ListMembersData, ListMembersErrors, ListMembersResponses, ListMessagesData, ListMessagesErrors, ListMessagesResponses, ListTagsData, ListTagsErrors, ListTagsResponses, ListTemplatesData, ListTemplatesErrors, ListTemplatesResponses, ListWebhookDeliveriesData, ListWebhookDeliveriesErrors, ListWebhookDeliveriesResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, ReopenConversationData, ReopenConversationErrors, ReopenConversationResponses, RetryWebhookDeliveryData, RetryWebhookDeliveryErrors, RetryWebhookDeliveryResponses, RotateWebhookSecretData, RotateWebhookSecretErrors, RotateWebhookSecretResponses, SendMessageData, SendMessageErrors, SendMessageResponses, StartConversationData, StartConversationErrors, StartConversationResponses, TestWebhookData, TestWebhookErrors, TestWebhookResponses, UpdateContactData, UpdateContactErrors, UpdateContactResponses } from './types.gen.js';
3
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
+ /**
5
+ * You can provide a client instance returned by `createClient()` instead of
6
+ * individual options. This might be also useful if you want to implement a
7
+ * custom client.
8
+ */
9
+ client?: Client;
10
+ /**
11
+ * You can pass arbitrary values through the `meta` object. This can be
12
+ * used to access values that aren't defined as part of the SDK function.
13
+ */
14
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
15
+ };
16
+ declare class HeyApiClient {
17
+ protected client: Client;
18
+ constructor(args?: {
19
+ client?: Client;
20
+ });
21
+ }
22
+ declare class HeyApiRegistry<T> {
23
+ private readonly defaultKey;
24
+ private readonly instances;
25
+ get(key?: string): T;
26
+ set(value: T, key?: string): void;
27
+ }
28
+ export declare class RickyApi extends HeyApiClient {
29
+ static readonly __registry: HeyApiRegistry<RickyApi>;
30
+ constructor(args?: {
31
+ client?: Client;
32
+ key?: string;
33
+ });
34
+ /**
35
+ * List contacts
36
+ *
37
+ * Most recently updated first. Filters combine.
38
+ *
39
+ * Scope: `contacts:read`.
40
+ */
41
+ listContacts<ThrowOnError extends boolean = true>(options?: Options<ListContactsData, ThrowOnError>): RequestResult<ListContactsResponses, ListContactsErrors, ThrowOnError, 'data'>;
42
+ /**
43
+ * Create a contact
44
+ *
45
+ * Creates a CRM contact. It does not message anyone; to reach a phone, start a conversation.
46
+ *
47
+ * Scope: `contacts:write`.
48
+ */
49
+ createContact<ThrowOnError extends boolean = true>(options: Options<CreateContactData, ThrowOnError>): RequestResult<CreateContactResponses, CreateContactErrors, ThrowOnError, 'data'>;
50
+ /**
51
+ * Get a contact
52
+ *
53
+ * One contact with its tags, identities and custom values.
54
+ *
55
+ * Scope: `contacts:read`.
56
+ */
57
+ getContact<ThrowOnError extends boolean = true>(options: Options<GetContactData, ThrowOnError>): RequestResult<GetContactResponses, GetContactErrors, ThrowOnError, 'data'>;
58
+ /**
59
+ * Update a contact
60
+ *
61
+ * Changes only the fields in the body. `tag_ids` replaces the whole tag set; `custom_values` merges by key.
62
+ *
63
+ * Scope: `contacts:write`.
64
+ */
65
+ updateContact<ThrowOnError extends boolean = true>(options: Options<UpdateContactData, ThrowOnError>): RequestResult<UpdateContactResponses, UpdateContactErrors, ThrowOnError, 'data'>;
66
+ /**
67
+ * Add a note to a contact
68
+ *
69
+ * Adds text after the current `notes`, separated by a blank line, and answers the contact. To replace the notes, update the contact.
70
+ *
71
+ * Scope: `contacts:write`.
72
+ */
73
+ addContactNote<ThrowOnError extends boolean = true>(options: Options<AddContactNoteData, ThrowOnError>): RequestResult<AddContactNoteResponses, AddContactNoteErrors, ThrowOnError, 'data'>;
74
+ /**
75
+ * List contact fields
76
+ *
77
+ * The custom fields whose IDs key `custom_values`.
78
+ *
79
+ * Scope: `contacts:read`.
80
+ */
81
+ listContactFields<ThrowOnError extends boolean = true>(options?: Options<ListContactFieldsData, ThrowOnError>): RequestResult<ListContactFieldsResponses, ListContactFieldsErrors, ThrowOnError, 'data'>;
82
+ /**
83
+ * List conversations
84
+ *
85
+ * Latest activity first.
86
+ *
87
+ * Scope: `conversations:read`.
88
+ */
89
+ listConversations<ThrowOnError extends boolean = true>(options?: Options<ListConversationsData, ThrowOnError>): RequestResult<ListConversationsResponses, ListConversationsErrors, ThrowOnError, 'data'>;
90
+ /**
91
+ * Start a conversation
92
+ *
93
+ * Sends an approved WhatsApp template to a phone number. Ricky finds or creates the contact and reuses the number's conversation on that channel. Answers `202`: the send is queued; follow it with `GET /sends/{send_id}`.
94
+ *
95
+ * Scope: `messages:send`.
96
+ */
97
+ startConversation<ThrowOnError extends boolean = true>(options: Options<StartConversationData, ThrowOnError>): RequestResult<StartConversationResponses, StartConversationErrors, ThrowOnError, 'data'>;
98
+ /**
99
+ * Get a conversation
100
+ *
101
+ * One conversation.
102
+ *
103
+ * Scope: `conversations:read`.
104
+ */
105
+ getConversation<ThrowOnError extends boolean = true>(options: Options<GetConversationData, ThrowOnError>): RequestResult<GetConversationResponses, GetConversationErrors, ThrowOnError, 'data'>;
106
+ /**
107
+ * Assign a conversation
108
+ *
109
+ * Makes a member responsible for the conversation, or unassigns it.
110
+ *
111
+ * Scope: `conversations:write`.
112
+ */
113
+ assignConversation<ThrowOnError extends boolean = true>(options: Options<AssignConversationData, ThrowOnError>): RequestResult<AssignConversationResponses, AssignConversationErrors, ThrowOnError, 'data'>;
114
+ /**
115
+ * Close a conversation
116
+ *
117
+ * Closing an already closed conversation changes nothing.
118
+ *
119
+ * Scope: `conversations:write`.
120
+ */
121
+ closeConversation<ThrowOnError extends boolean = true>(options: Options<CloseConversationData, ThrowOnError>): RequestResult<CloseConversationResponses, CloseConversationErrors, ThrowOnError, 'data'>;
122
+ /**
123
+ * Reopen a conversation
124
+ *
125
+ * Reopening an open conversation changes nothing. Send no body.
126
+ *
127
+ * Scope: `conversations:write`.
128
+ */
129
+ reopenConversation<ThrowOnError extends boolean = true>(options: Options<ReopenConversationData, ThrowOnError>): RequestResult<ReopenConversationResponses, ReopenConversationErrors, ThrowOnError, 'data'>;
130
+ /**
131
+ * List messages
132
+ *
133
+ * Newest first.
134
+ *
135
+ * Scope: `conversations:read`.
136
+ */
137
+ listMessages<ThrowOnError extends boolean = true>(options: Options<ListMessagesData, ThrowOnError>): RequestResult<ListMessagesResponses, ListMessagesErrors, ThrowOnError, 'data'>;
138
+ /**
139
+ * Send a message
140
+ *
141
+ * Sends text, a file on WhatsApp or Instagram, or a template on WhatsApp. For a file, Ricky downloads `media.url` before answering. Answers `202`: the send is queued; follow it with `GET /sends/{send_id}`. A `message.sent` webhook fires once the provider accepts it.
142
+ *
143
+ * Scope: `messages:send`.
144
+ */
145
+ sendMessage<ThrowOnError extends boolean = true>(options: Options<SendMessageData, ThrowOnError>): RequestResult<SendMessageResponses, SendMessageErrors, ThrowOnError, 'data'>;
146
+ /**
147
+ * Get a message
148
+ *
149
+ * One message, as the list shows it. A media `url` is signed again on each read.
150
+ *
151
+ * Scope: `conversations:read`.
152
+ */
153
+ getMessage<ThrowOnError extends boolean = true>(options: Options<GetMessageData, ThrowOnError>): RequestResult<GetMessageResponses, GetMessageErrors, ThrowOnError, 'data'>;
154
+ /**
155
+ * Get a send
156
+ *
157
+ * Whether the provider accepted a message, and why not if it failed.
158
+ *
159
+ * Scope: `messages:send`.
160
+ */
161
+ getSend<ThrowOnError extends boolean = true>(options: Options<GetSendData, ThrowOnError>): RequestResult<GetSendResponses, GetSendErrors, ThrowOnError, 'data'>;
162
+ /**
163
+ * List channels
164
+ *
165
+ * WhatsApp numbers, Instagram accounts and Facebook pages.
166
+ *
167
+ * Scope: `conversations:read`.
168
+ */
169
+ listChannels<ThrowOnError extends boolean = true>(options?: Options<ListChannelsData, ThrowOnError>): RequestResult<ListChannelsResponses, ListChannelsErrors, ThrowOnError, 'data'>;
170
+ /**
171
+ * List members
172
+ *
173
+ * People in the organization; their IDs assign conversations and own contacts.
174
+ *
175
+ * Scope: `members:read`.
176
+ */
177
+ listMembers<ThrowOnError extends boolean = true>(options?: Options<ListMembersData, ThrowOnError>): RequestResult<ListMembersResponses, ListMembersErrors, ThrowOnError, 'data'>;
178
+ /**
179
+ * List tags
180
+ *
181
+ * Contact tags.
182
+ *
183
+ * Scope: `tags:read`.
184
+ */
185
+ listTags<ThrowOnError extends boolean = true>(options?: Options<ListTagsData, ThrowOnError>): RequestResult<ListTagsResponses, ListTagsErrors, ThrowOnError, 'data'>;
186
+ /**
187
+ * Create a tag
188
+ *
189
+ * Creates a contact tag. Apply it with `tag_ids` on a contact. A name already in use, in any case, answers `409 conflict`.
190
+ *
191
+ * Scope: `contacts:write`.
192
+ */
193
+ createTag<ThrowOnError extends boolean = true>(options: Options<CreateTagData, ThrowOnError>): RequestResult<CreateTagResponses, CreateTagErrors, ThrowOnError, 'data'>;
194
+ /**
195
+ * List templates
196
+ *
197
+ * WhatsApp templates of every connected business account, read live from Meta.
198
+ *
199
+ * Scope: `templates:read`.
200
+ */
201
+ listTemplates<ThrowOnError extends boolean = true>(options?: Options<ListTemplatesData, ThrowOnError>): RequestResult<ListTemplatesResponses, ListTemplatesErrors, ThrowOnError, 'data'>;
202
+ /**
203
+ * List webhooks
204
+ *
205
+ * Newest first, at most 100.
206
+ *
207
+ * Scope: `webhooks:manage`.
208
+ */
209
+ listWebhooks<ThrowOnError extends boolean = true>(options?: Options<ListWebhooksData, ThrowOnError>): RequestResult<ListWebhooksResponses, ListWebhooksErrors, ThrowOnError, 'data'>;
210
+ /**
211
+ * Create a webhook
212
+ *
213
+ * The response carries `signing_secret`, the only time Ricky shows it.
214
+ *
215
+ * Scope: `webhooks:manage`.
216
+ */
217
+ createWebhook<ThrowOnError extends boolean = true>(options: Options<CreateWebhookData, ThrowOnError>): RequestResult<CreateWebhookResponses, CreateWebhookErrors, ThrowOnError, 'data'>;
218
+ /**
219
+ * Disable a webhook
220
+ *
221
+ * Stops new and pending deliveries. Disabling twice answers `404`.
222
+ *
223
+ * Scope: `webhooks:manage`.
224
+ */
225
+ disableWebhook<ThrowOnError extends boolean = true>(options: Options<DisableWebhookData, ThrowOnError>): RequestResult<DisableWebhookResponses, DisableWebhookErrors, ThrowOnError, 'data'>;
226
+ /**
227
+ * Send a test event
228
+ *
229
+ * Sends one signed `webhook.test` event to the endpoint now and answers what it replied. It is not recorded as a delivery and is not retried.
230
+ *
231
+ * Scope: `webhooks:manage`.
232
+ */
233
+ testWebhook<ThrowOnError extends boolean = true>(options: Options<TestWebhookData, ThrowOnError>): RequestResult<TestWebhookResponses, TestWebhookErrors, ThrowOnError, 'data'>;
234
+ /**
235
+ * Rotate the signing secret
236
+ *
237
+ * Returns a new `signing_secret`, the only time Ricky shows it. Until `expire_previous_after_hours` passes, every delivery carries two signatures in `X-Ricky-Signature`, new first, so you can deploy the new secret without missing events. The body is optional.
238
+ *
239
+ * Scope: `webhooks:manage`.
240
+ */
241
+ rotateWebhookSecret<ThrowOnError extends boolean = true>(options: Options<RotateWebhookSecretData, ThrowOnError>): RequestResult<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError, 'data'>;
242
+ /**
243
+ * List deliveries
244
+ *
245
+ * The 100 most recent deliveries of a webhook.
246
+ *
247
+ * Scope: `webhooks:manage`.
248
+ */
249
+ listWebhookDeliveries<ThrowOnError extends boolean = true>(options: Options<ListWebhookDeliveriesData, ThrowOnError>): RequestResult<ListWebhookDeliveriesResponses, ListWebhookDeliveriesErrors, ThrowOnError, 'data'>;
250
+ /**
251
+ * Retry a delivery
252
+ *
253
+ * Queues a failed delivery again with a fresh attempt budget and sends it at once.
254
+ *
255
+ * Scope: `webhooks:manage`.
256
+ */
257
+ retryWebhookDelivery<ThrowOnError extends boolean = true>(options: Options<RetryWebhookDeliveryData, ThrowOnError>): RequestResult<RetryWebhookDeliveryResponses, RetryWebhookDeliveryErrors, ThrowOnError, 'data'>;
258
+ }
259
+ export {};