@unlimited-messaging/sdk 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Client.d.ts +9 -6
- package/src/Client.js +11 -6
- package/src/api/errors/BadRequestError.d.ts +8 -0
- package/src/api/errors/BadRequestError.js +52 -0
- package/src/api/errors/ForbiddenError.d.ts +8 -0
- package/src/api/errors/ForbiddenError.js +52 -0
- package/src/api/errors/NotFoundError.d.ts +8 -0
- package/src/api/errors/NotFoundError.js +52 -0
- package/src/api/errors/UnauthorizedError.d.ts +8 -0
- package/src/api/errors/UnauthorizedError.js +52 -0
- package/src/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/src/api/errors/UnprocessableEntityError.js +52 -0
- package/src/api/errors/index.d.ts +5 -0
- package/src/api/errors/index.js +21 -0
- package/src/api/index.d.ts +1 -0
- package/src/api/index.js +1 -0
- package/src/api/resources/apiKeys/client/Client.d.ts +81 -0
- package/src/api/resources/apiKeys/client/Client.js +288 -0
- package/src/api/resources/apiKeys/client/requests/ApiKeyCreateRequest.d.ts +13 -0
- package/src/api/resources/apiKeys/client/requests/ApiKeyRevokeRequest.d.ts +9 -0
- package/src/api/resources/apiKeys/client/requests/index.d.ts +2 -0
- package/src/api/resources/apiKeys/types/ApiKeyCreateResponse.d.ts +14 -0
- package/src/api/resources/apiKeys/types/ApiKeyListResponseItem.d.ts +13 -0
- package/src/api/resources/apiKeys/types/index.d.ts +2 -0
- package/src/api/resources/apiKeys/types/index.js +18 -0
- package/src/api/resources/index.d.ts +9 -5
- package/src/api/resources/index.js +10 -6
- package/src/api/resources/messages/client/Client.d.ts +92 -0
- package/src/api/resources/{message → messages}/client/Client.js +96 -37
- package/src/api/resources/{message → messages}/client/requests/MessageFindAllRequest.d.ts +2 -0
- package/src/api/resources/{message → messages}/client/requests/MessageSendRequest.d.ts +1 -1
- package/src/api/resources/messages/types/MessageFindAllRequestChannel.d.ts +9 -0
- package/src/api/resources/messages/types/MessageFindAllRequestChannel.js +11 -0
- package/src/api/resources/messages/types/MessageFindAllRequestDirection.d.ts +8 -0
- package/src/api/resources/messages/types/MessageFindAllRequestDirection.js +10 -0
- package/src/api/resources/{message → messages}/types/MessageFindAllRequestStatus.d.ts +2 -1
- package/src/api/resources/{message → messages}/types/MessageFindAllRequestStatus.js +1 -0
- package/src/api/resources/{message → messages}/types/MessageFindAllResponseDataItem.d.ts +2 -0
- package/src/api/resources/messages/types/MessageFindAllResponseDataItem.js +5 -0
- package/src/api/resources/messages/types/MessageFindAllResponseDataItemChannel.d.ts +9 -0
- package/src/api/resources/messages/types/MessageFindAllResponseDataItemChannel.js +11 -0
- package/src/api/resources/{message → messages}/types/MessageFindAllResponseDataItemStatus.d.ts +2 -1
- package/src/api/resources/{message → messages}/types/MessageFindAllResponseDataItemStatus.js +1 -0
- package/src/api/resources/{message → messages}/types/MessageFindOneResponse.d.ts +2 -0
- package/src/api/resources/messages/types/MessageFindOneResponse.js +5 -0
- package/src/api/resources/messages/types/MessageFindOneResponseChannel.d.ts +9 -0
- package/src/api/resources/messages/types/MessageFindOneResponseChannel.js +11 -0
- package/src/api/resources/{message → messages}/types/MessageFindOneResponseStatus.d.ts +2 -1
- package/src/api/resources/{message → messages}/types/MessageFindOneResponseStatus.js +1 -0
- package/src/api/resources/{message → messages}/types/MessageSendResponse.d.ts +2 -0
- package/src/api/resources/messages/types/MessageSendResponse.js +5 -0
- package/src/api/resources/messages/types/MessageSendResponseChannel.d.ts +9 -0
- package/src/api/resources/messages/types/MessageSendResponseChannel.js +11 -0
- package/src/api/resources/{message → messages}/types/MessageSendResponseStatus.d.ts +2 -1
- package/src/api/resources/{message → messages}/types/MessageSendResponseStatus.js +1 -0
- package/src/{serialization/resources/message → api/resources/messages}/types/index.d.ts +5 -0
- package/src/{serialization/resources/message → api/resources/messages}/types/index.js +5 -0
- package/src/api/resources/siMs/client/Client.d.ts +137 -0
- package/src/api/resources/siMs/client/Client.js +521 -0
- package/src/api/resources/siMs/client/index.d.ts +1 -0
- package/src/api/resources/{sim/types → siMs/client}/index.js +1 -1
- package/src/api/resources/siMs/client/requests/SimGetSimQrCodeRequest.d.ts +9 -0
- package/src/api/resources/siMs/client/requests/SimGetSimQrCodeRequest.js +5 -0
- package/src/api/resources/siMs/client/requests/SimGetSimRequest.d.ts +9 -0
- package/src/api/resources/siMs/client/requests/SimGetSimRequest.js +5 -0
- package/src/api/resources/siMs/client/requests/SimUnlinkSimRequest.d.ts +9 -0
- package/src/api/resources/siMs/client/requests/SimUnlinkSimRequest.js +5 -0
- package/src/api/resources/siMs/client/requests/SimUpdateSimRequest.d.ts +12 -0
- package/src/api/resources/siMs/client/requests/SimUpdateSimRequest.js +5 -0
- package/src/api/resources/siMs/client/requests/index.d.ts +4 -0
- package/src/api/resources/siMs/client/requests/index.js +2 -0
- package/src/api/resources/{sim → siMs}/types/SimGetLinkedSimsResponseItem.d.ts +4 -0
- package/src/api/resources/siMs/types/SimGetLinkedSimsResponseItem.js +5 -0
- package/src/api/resources/siMs/types/SimGetLinkedSimsResponseItemStatus.d.ts +11 -0
- package/src/api/resources/siMs/types/SimGetLinkedSimsResponseItemStatus.js +13 -0
- package/src/api/resources/siMs/types/SimGetLinkedSimsResponseItemType.d.ts +8 -0
- package/src/api/resources/siMs/types/SimGetLinkedSimsResponseItemType.js +10 -0
- package/src/api/resources/siMs/types/SimGetSimQrCodeResponse.d.ts +6 -0
- package/src/api/resources/siMs/types/SimGetSimQrCodeResponse.js +5 -0
- package/src/api/resources/siMs/types/SimGetSimResponse.d.ts +14 -0
- package/src/api/resources/siMs/types/SimGetSimResponse.js +5 -0
- package/src/api/resources/siMs/types/SimGetSimResponseStatus.d.ts +11 -0
- package/src/api/resources/siMs/types/SimGetSimResponseStatus.js +13 -0
- package/src/api/resources/siMs/types/SimGetSimResponseType.d.ts +8 -0
- package/src/api/resources/siMs/types/SimGetSimResponseType.js +10 -0
- package/src/api/resources/siMs/types/SimLinkSimResponse.d.ts +6 -0
- package/src/api/resources/siMs/types/SimLinkSimResponse.js +5 -0
- package/src/api/resources/siMs/types/SimUpdateSimResponse.d.ts +14 -0
- package/src/api/resources/siMs/types/SimUpdateSimResponse.js +5 -0
- package/src/api/resources/siMs/types/SimUpdateSimResponseStatus.d.ts +11 -0
- package/src/api/resources/siMs/types/SimUpdateSimResponseStatus.js +13 -0
- package/src/api/resources/siMs/types/SimUpdateSimResponseType.d.ts +8 -0
- package/src/api/resources/siMs/types/SimUpdateSimResponseType.js +10 -0
- package/src/api/resources/siMs/types/index.d.ts +11 -0
- package/src/api/resources/siMs/types/index.js +27 -0
- package/src/serialization/resources/apiKeys/client/apiKeyList.d.ts +11 -0
- package/src/serialization/resources/apiKeys/client/apiKeyList.js +42 -0
- package/src/serialization/resources/apiKeys/client/index.d.ts +2 -0
- package/src/serialization/resources/{sim → apiKeys}/client/index.js +6 -2
- package/src/serialization/resources/apiKeys/client/requests/ApiKeyCreateRequest.d.ts +13 -0
- package/src/serialization/resources/apiKeys/client/requests/ApiKeyCreateRequest.js +44 -0
- package/src/serialization/resources/apiKeys/client/requests/index.d.ts +1 -0
- package/src/serialization/resources/apiKeys/client/requests/index.js +5 -0
- package/src/serialization/resources/apiKeys/types/ApiKeyCreateResponse.d.ts +20 -0
- package/src/serialization/resources/apiKeys/types/ApiKeyCreateResponse.js +51 -0
- package/src/serialization/resources/apiKeys/types/ApiKeyListResponseItem.d.ts +19 -0
- package/src/serialization/resources/{sim/types/SimGetLinkedSimsResponseItem.js → apiKeys/types/ApiKeyListResponseItem.js} +7 -4
- package/src/serialization/resources/apiKeys/types/index.d.ts +2 -0
- package/src/serialization/resources/apiKeys/types/index.js +18 -0
- package/src/serialization/resources/index.d.ts +9 -5
- package/src/serialization/resources/index.js +10 -6
- package/src/serialization/resources/messages/client/index.d.ts +1 -0
- package/src/serialization/resources/{sim/types → messages/client}/index.js +1 -1
- package/src/serialization/resources/{message → messages}/client/requests/MessageSendRequest.d.ts +1 -1
- package/src/serialization/resources/{message → messages}/client/requests/MessageSendRequest.js +1 -1
- package/src/serialization/resources/messages/index.d.ts +2 -0
- package/src/serialization/resources/messages/index.js +18 -0
- package/src/serialization/resources/messages/types/MessageFindAllRequestChannel.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageFindAllRequestChannel.js +41 -0
- package/src/serialization/resources/messages/types/MessageFindAllRequestDirection.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageFindAllRequestDirection.js +41 -0
- package/src/serialization/resources/{message → messages}/types/MessageFindAllRequestStatus.d.ts +1 -1
- package/src/serialization/resources/{message → messages}/types/MessageFindAllRequestStatus.js +1 -1
- package/src/serialization/resources/{message → messages}/types/MessageFindAllResponseDataItem.d.ts +3 -0
- package/src/serialization/resources/{message → messages}/types/MessageFindAllResponseDataItem.js +3 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItemChannel.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItemChannel.js +41 -0
- package/src/serialization/resources/{message → messages}/types/MessageFindAllResponseDataItemStatus.d.ts +1 -1
- package/src/serialization/resources/{message → messages}/types/MessageFindAllResponseDataItemStatus.js +1 -1
- package/src/serialization/resources/{message → messages}/types/MessageFindOneResponse.d.ts +3 -0
- package/src/serialization/resources/{message → messages}/types/MessageFindOneResponse.js +3 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponseChannel.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponseChannel.js +41 -0
- package/src/serialization/resources/{message → messages}/types/MessageFindOneResponseStatus.d.ts +1 -1
- package/src/serialization/resources/{message → messages}/types/MessageFindOneResponseStatus.js +1 -1
- package/src/serialization/resources/{message → messages}/types/MessageSendResponse.d.ts +3 -0
- package/src/serialization/resources/{message → messages}/types/MessageSendResponse.js +3 -0
- package/src/serialization/resources/messages/types/MessageSendResponseChannel.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageSendResponseChannel.js +41 -0
- package/src/serialization/resources/{message → messages}/types/MessageSendResponseStatus.d.ts +1 -1
- package/src/serialization/resources/{message → messages}/types/MessageSendResponseStatus.js +1 -1
- package/src/{api/resources/message → serialization/resources/messages}/types/index.d.ts +5 -0
- package/src/{api/resources/message → serialization/resources/messages}/types/index.js +5 -0
- package/src/serialization/resources/siMs/client/index.d.ts +2 -0
- package/src/serialization/resources/siMs/client/index.js +41 -0
- package/src/serialization/resources/siMs/client/requests/SimUpdateSimRequest.d.ts +12 -0
- package/src/serialization/resources/siMs/client/requests/SimUpdateSimRequest.js +43 -0
- package/src/serialization/resources/siMs/client/requests/index.d.ts +1 -0
- package/src/serialization/resources/siMs/client/requests/index.js +5 -0
- package/src/serialization/resources/{sim/client/getLinkedSims.d.ts → siMs/client/simGetLinkedSims.d.ts} +1 -1
- package/src/serialization/resources/siMs/index.d.ts +2 -0
- package/src/serialization/resources/siMs/index.js +18 -0
- package/src/serialization/resources/{sim → siMs}/types/SimGetLinkedSimsResponseItem.d.ts +5 -0
- package/src/serialization/resources/siMs/types/SimGetLinkedSimsResponseItem.js +52 -0
- package/src/serialization/resources/siMs/types/SimGetLinkedSimsResponseItemStatus.d.ts +10 -0
- package/src/serialization/resources/siMs/types/SimGetLinkedSimsResponseItemStatus.js +41 -0
- package/src/serialization/resources/siMs/types/SimGetLinkedSimsResponseItemType.d.ts +10 -0
- package/src/serialization/resources/siMs/types/SimGetLinkedSimsResponseItemType.js +41 -0
- package/src/serialization/resources/siMs/types/SimGetSimQrCodeResponse.d.ts +12 -0
- package/src/serialization/resources/siMs/types/SimGetSimQrCodeResponse.js +43 -0
- package/src/serialization/resources/siMs/types/SimGetSimResponse.d.ts +21 -0
- package/src/serialization/resources/siMs/types/SimGetSimResponse.js +52 -0
- package/src/serialization/resources/siMs/types/SimGetSimResponseStatus.d.ts +10 -0
- package/src/serialization/resources/siMs/types/SimGetSimResponseStatus.js +41 -0
- package/src/serialization/resources/siMs/types/SimGetSimResponseType.d.ts +10 -0
- package/src/serialization/resources/siMs/types/SimGetSimResponseType.js +41 -0
- package/src/serialization/resources/siMs/types/SimLinkSimResponse.d.ts +12 -0
- package/src/serialization/resources/siMs/types/SimLinkSimResponse.js +43 -0
- package/src/serialization/resources/siMs/types/SimUpdateSimResponse.d.ts +21 -0
- package/src/serialization/resources/siMs/types/SimUpdateSimResponse.js +52 -0
- package/src/serialization/resources/siMs/types/SimUpdateSimResponseStatus.d.ts +10 -0
- package/src/serialization/resources/siMs/types/SimUpdateSimResponseStatus.js +41 -0
- package/src/serialization/resources/siMs/types/SimUpdateSimResponseType.d.ts +10 -0
- package/src/serialization/resources/siMs/types/SimUpdateSimResponseType.js +41 -0
- package/src/serialization/resources/siMs/types/index.d.ts +11 -0
- package/src/serialization/resources/siMs/types/index.js +27 -0
- package/src/api/resources/message/client/Client.d.ts +0 -75
- package/src/api/resources/sim/client/Client.d.ts +0 -41
- package/src/api/resources/sim/client/Client.js +0 -129
- package/src/api/resources/sim/client/index.d.ts +0 -1
- package/src/api/resources/sim/types/index.d.ts +0 -1
- package/src/serialization/resources/sim/client/index.d.ts +0 -1
- package/src/serialization/resources/sim/types/index.d.ts +0 -1
- /package/src/api/resources/{message → apiKeys}/client/index.d.ts +0 -0
- /package/src/api/resources/{message → apiKeys}/client/index.js +0 -0
- /package/src/api/resources/{message/client/requests/MessageFindAllRequest.js → apiKeys/client/requests/ApiKeyCreateRequest.js} +0 -0
- /package/src/api/resources/{message/client/requests/MessageFindOneRequest.js → apiKeys/client/requests/ApiKeyRevokeRequest.js} +0 -0
- /package/src/api/resources/{message → apiKeys}/client/requests/index.js +0 -0
- /package/src/api/resources/{message → apiKeys}/index.d.ts +0 -0
- /package/src/api/resources/{message → apiKeys}/index.js +0 -0
- /package/src/api/resources/{message/client/requests/MessageSendRequest.js → apiKeys/types/ApiKeyCreateResponse.js} +0 -0
- /package/src/api/resources/{message/types/MessageFindAllResponse.js → apiKeys/types/ApiKeyListResponseItem.js} +0 -0
- /package/src/{serialization/resources/message → api/resources/messages}/client/index.d.ts +0 -0
- /package/src/{serialization/resources/message → api/resources/messages}/client/index.js +0 -0
- /package/src/api/resources/{message/types/MessageFindAllResponseDataItem.js → messages/client/requests/MessageFindAllRequest.js} +0 -0
- /package/src/api/resources/{message → messages}/client/requests/MessageFindOneRequest.d.ts +0 -0
- /package/src/api/resources/{message/types/MessageFindOneResponse.js → messages/client/requests/MessageFindOneRequest.js} +0 -0
- /package/src/api/resources/{message/types/MessageSendResponse.js → messages/client/requests/MessageSendRequest.js} +0 -0
- /package/src/api/resources/{message → messages}/client/requests/index.d.ts +0 -0
- /package/src/api/resources/{sim/client → messages/client/requests}/index.js +0 -0
- /package/src/api/resources/{sim → messages}/index.d.ts +0 -0
- /package/src/api/resources/{sim → messages}/index.js +0 -0
- /package/src/api/resources/{message → messages}/types/MessageFindAllResponse.d.ts +0 -0
- /package/src/api/resources/{sim/types/SimGetLinkedSimsResponseItem.js → messages/types/MessageFindAllResponse.js} +0 -0
- /package/src/api/resources/{message → messages}/types/MessageFindAllResponseDataItemDirection.d.ts +0 -0
- /package/src/api/resources/{message → messages}/types/MessageFindAllResponseDataItemDirection.js +0 -0
- /package/src/api/resources/{message → messages}/types/MessageFindOneResponseDirection.d.ts +0 -0
- /package/src/api/resources/{message → messages}/types/MessageFindOneResponseDirection.js +0 -0
- /package/src/api/resources/{message → messages}/types/MessageSendResponseDirection.d.ts +0 -0
- /package/src/api/resources/{message → messages}/types/MessageSendResponseDirection.js +0 -0
- /package/src/{serialization/resources/message → api/resources/siMs}/index.d.ts +0 -0
- /package/src/{serialization/resources/message → api/resources/siMs}/index.js +0 -0
- /package/src/serialization/resources/{sim → apiKeys}/index.d.ts +0 -0
- /package/src/serialization/resources/{sim → apiKeys}/index.js +0 -0
- /package/src/serialization/resources/{message → messages}/client/requests/index.d.ts +0 -0
- /package/src/serialization/resources/{message → messages}/client/requests/index.js +0 -0
- /package/src/serialization/resources/{message → messages}/types/MessageFindAllResponse.d.ts +0 -0
- /package/src/serialization/resources/{message → messages}/types/MessageFindAllResponse.js +0 -0
- /package/src/serialization/resources/{message → messages}/types/MessageFindAllResponseDataItemDirection.d.ts +0 -0
- /package/src/serialization/resources/{message → messages}/types/MessageFindAllResponseDataItemDirection.js +0 -0
- /package/src/serialization/resources/{message → messages}/types/MessageFindOneResponseDirection.d.ts +0 -0
- /package/src/serialization/resources/{message → messages}/types/MessageFindOneResponseDirection.js +0 -0
- /package/src/serialization/resources/{message → messages}/types/MessageSendResponseDirection.d.ts +0 -0
- /package/src/serialization/resources/{message → messages}/types/MessageSendResponseDirection.js +0 -0
- /package/src/serialization/resources/{sim/client/getLinkedSims.js → siMs/client/simGetLinkedSims.js} +0 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.ApiKeys = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../core"));
|
|
54
|
+
const UnlimitedMessagingApi = __importStar(require("../../../index"));
|
|
55
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
57
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
58
|
+
class ApiKeys {
|
|
59
|
+
constructor(_options) {
|
|
60
|
+
this._options = _options;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ
|
|
64
|
+
*
|
|
65
|
+
* Returns all active API keys for the authenticated user. The raw key value is never returned — only metadata (id, name, prefix, dates).
|
|
66
|
+
*
|
|
67
|
+
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
70
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.apiKeys.apiKeyList()
|
|
74
|
+
*/
|
|
75
|
+
apiKeyList(requestOptions) {
|
|
76
|
+
return core.HttpResponsePromise.fromPromise(this.__apiKeyList(requestOptions));
|
|
77
|
+
}
|
|
78
|
+
__apiKeyList(requestOptions) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
const _response = yield core.fetcher({
|
|
82
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.UnlimitedMessagingApiEnvironment.Production, "api-keys"),
|
|
83
|
+
method: "GET",
|
|
84
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
85
|
+
contentType: "application/json",
|
|
86
|
+
requestType: "json",
|
|
87
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
88
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
89
|
+
withCredentials: true,
|
|
90
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
|
+
});
|
|
92
|
+
if (_response.ok) {
|
|
93
|
+
return {
|
|
94
|
+
data: serializers.apiKeys.apiKeyList.Response.parseOrThrow(_response.body, {
|
|
95
|
+
unrecognizedObjectKeys: "passthrough",
|
|
96
|
+
allowUnrecognizedUnionMembers: true,
|
|
97
|
+
allowUnrecognizedEnumValues: true,
|
|
98
|
+
breadcrumbsPrefix: ["response"],
|
|
99
|
+
}),
|
|
100
|
+
rawResponse: _response.rawResponse,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
if (_response.error.reason === "status-code") {
|
|
104
|
+
switch (_response.error.statusCode) {
|
|
105
|
+
case 401:
|
|
106
|
+
throw new UnlimitedMessagingApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
107
|
+
case 403:
|
|
108
|
+
throw new UnlimitedMessagingApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
109
|
+
default:
|
|
110
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
111
|
+
statusCode: _response.error.statusCode,
|
|
112
|
+
body: _response.error.body,
|
|
113
|
+
rawResponse: _response.rawResponse,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
switch (_response.error.reason) {
|
|
118
|
+
case "non-json":
|
|
119
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
120
|
+
statusCode: _response.error.statusCode,
|
|
121
|
+
body: _response.error.rawBody,
|
|
122
|
+
rawResponse: _response.rawResponse,
|
|
123
|
+
});
|
|
124
|
+
case "timeout":
|
|
125
|
+
throw new errors.UnlimitedMessagingApiTimeoutError("Timeout exceeded when calling GET /api-keys.");
|
|
126
|
+
case "unknown":
|
|
127
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
128
|
+
message: _response.error.errorMessage,
|
|
129
|
+
rawResponse: _response.rawResponse,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:WRITE
|
|
136
|
+
*
|
|
137
|
+
* Generates a new API key for the authenticated user. The raw `key` value is only returned once — store it securely.
|
|
138
|
+
*
|
|
139
|
+
* @param {UnlimitedMessagingApi.ApiKeyCreateRequest} request
|
|
140
|
+
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
141
|
+
*
|
|
142
|
+
* @throws {@link UnlimitedMessagingApi.BadRequestError}
|
|
143
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
144
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* await client.apiKeys.apiKeyCreate({
|
|
148
|
+
* name: "name"
|
|
149
|
+
* })
|
|
150
|
+
*/
|
|
151
|
+
apiKeyCreate(request, requestOptions) {
|
|
152
|
+
return core.HttpResponsePromise.fromPromise(this.__apiKeyCreate(request, requestOptions));
|
|
153
|
+
}
|
|
154
|
+
__apiKeyCreate(request, requestOptions) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
var _a, _b;
|
|
157
|
+
const _response = yield core.fetcher({
|
|
158
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.UnlimitedMessagingApiEnvironment.Production, "api-keys"),
|
|
159
|
+
method: "POST",
|
|
160
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
161
|
+
contentType: "application/json",
|
|
162
|
+
requestType: "json",
|
|
163
|
+
body: serializers.ApiKeyCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
164
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
165
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
166
|
+
withCredentials: true,
|
|
167
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
168
|
+
});
|
|
169
|
+
if (_response.ok) {
|
|
170
|
+
return {
|
|
171
|
+
data: serializers.ApiKeyCreateResponse.parseOrThrow(_response.body, {
|
|
172
|
+
unrecognizedObjectKeys: "passthrough",
|
|
173
|
+
allowUnrecognizedUnionMembers: true,
|
|
174
|
+
allowUnrecognizedEnumValues: true,
|
|
175
|
+
breadcrumbsPrefix: ["response"],
|
|
176
|
+
}),
|
|
177
|
+
rawResponse: _response.rawResponse,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
if (_response.error.reason === "status-code") {
|
|
181
|
+
switch (_response.error.statusCode) {
|
|
182
|
+
case 400:
|
|
183
|
+
throw new UnlimitedMessagingApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
184
|
+
case 401:
|
|
185
|
+
throw new UnlimitedMessagingApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
186
|
+
case 403:
|
|
187
|
+
throw new UnlimitedMessagingApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
188
|
+
default:
|
|
189
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
190
|
+
statusCode: _response.error.statusCode,
|
|
191
|
+
body: _response.error.body,
|
|
192
|
+
rawResponse: _response.rawResponse,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
switch (_response.error.reason) {
|
|
197
|
+
case "non-json":
|
|
198
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
199
|
+
statusCode: _response.error.statusCode,
|
|
200
|
+
body: _response.error.rawBody,
|
|
201
|
+
rawResponse: _response.rawResponse,
|
|
202
|
+
});
|
|
203
|
+
case "timeout":
|
|
204
|
+
throw new errors.UnlimitedMessagingApiTimeoutError("Timeout exceeded when calling POST /api-keys.");
|
|
205
|
+
case "unknown":
|
|
206
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
207
|
+
message: _response.error.errorMessage,
|
|
208
|
+
rawResponse: _response.rawResponse,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:WRITE
|
|
215
|
+
*
|
|
216
|
+
* Permanently revokes an API key by ID. The key is immediately invalidated and cannot be restored.
|
|
217
|
+
*
|
|
218
|
+
* @param {string} id
|
|
219
|
+
* @param {UnlimitedMessagingApi.ApiKeyRevokeRequest} request
|
|
220
|
+
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
221
|
+
*
|
|
222
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
223
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
224
|
+
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* await client.apiKeys.apiKeyRevoke("id")
|
|
228
|
+
*/
|
|
229
|
+
apiKeyRevoke(id, request = {}, requestOptions) {
|
|
230
|
+
return core.HttpResponsePromise.fromPromise(this.__apiKeyRevoke(id, request, requestOptions));
|
|
231
|
+
}
|
|
232
|
+
__apiKeyRevoke(id_1) {
|
|
233
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
234
|
+
var _a, _b;
|
|
235
|
+
const _response = yield core.fetcher({
|
|
236
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.UnlimitedMessagingApiEnvironment.Production, `api-keys/${encodeURIComponent(id)}`),
|
|
237
|
+
method: "DELETE",
|
|
238
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
239
|
+
contentType: "application/json",
|
|
240
|
+
requestType: "json",
|
|
241
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
242
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
243
|
+
withCredentials: true,
|
|
244
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
245
|
+
});
|
|
246
|
+
if (_response.ok) {
|
|
247
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
248
|
+
}
|
|
249
|
+
if (_response.error.reason === "status-code") {
|
|
250
|
+
switch (_response.error.statusCode) {
|
|
251
|
+
case 401:
|
|
252
|
+
throw new UnlimitedMessagingApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
253
|
+
case 403:
|
|
254
|
+
throw new UnlimitedMessagingApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
255
|
+
case 404:
|
|
256
|
+
throw new UnlimitedMessagingApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
257
|
+
default:
|
|
258
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
259
|
+
statusCode: _response.error.statusCode,
|
|
260
|
+
body: _response.error.body,
|
|
261
|
+
rawResponse: _response.rawResponse,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
switch (_response.error.reason) {
|
|
266
|
+
case "non-json":
|
|
267
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
268
|
+
statusCode: _response.error.statusCode,
|
|
269
|
+
body: _response.error.rawBody,
|
|
270
|
+
rawResponse: _response.rawResponse,
|
|
271
|
+
});
|
|
272
|
+
case "timeout":
|
|
273
|
+
throw new errors.UnlimitedMessagingApiTimeoutError("Timeout exceeded when calling DELETE /api-keys/{id}.");
|
|
274
|
+
case "unknown":
|
|
275
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
276
|
+
message: _response.error.errorMessage,
|
|
277
|
+
rawResponse: _response.rawResponse,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
_getAuthorizationHeader() {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
exports.ApiKeys = ApiKeys;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiKeyCreateResponse {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
prefix: string;
|
|
8
|
+
expiresAt: Date | null;
|
|
9
|
+
lastUsedAt: Date | null;
|
|
10
|
+
revokedAt: Date | null;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
key: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiKeyListResponseItem {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
prefix: string;
|
|
8
|
+
expiresAt: Date | null;
|
|
9
|
+
lastUsedAt: Date | null;
|
|
10
|
+
revokedAt: Date | null;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ApiKeyListResponseItem"), exports);
|
|
18
|
+
__exportStar(require("./ApiKeyCreateResponse"), exports);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * from "./
|
|
3
|
-
export * as
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
1
|
+
export * as messages from "./messages";
|
|
2
|
+
export * from "./messages/types";
|
|
3
|
+
export * as siMs from "./siMs";
|
|
4
|
+
export * from "./siMs/types";
|
|
5
|
+
export * as apiKeys from "./apiKeys";
|
|
6
|
+
export * from "./apiKeys/types";
|
|
7
|
+
export * from "./messages/client/requests";
|
|
8
|
+
export * from "./siMs/client/requests";
|
|
9
|
+
export * from "./apiKeys/client/requests";
|
|
@@ -36,9 +36,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
__exportStar(require("./
|
|
42
|
-
exports.
|
|
43
|
-
__exportStar(require("./
|
|
44
|
-
|
|
39
|
+
exports.apiKeys = exports.siMs = exports.messages = void 0;
|
|
40
|
+
exports.messages = __importStar(require("./messages"));
|
|
41
|
+
__exportStar(require("./messages/types"), exports);
|
|
42
|
+
exports.siMs = __importStar(require("./siMs"));
|
|
43
|
+
__exportStar(require("./siMs/types"), exports);
|
|
44
|
+
exports.apiKeys = __importStar(require("./apiKeys"));
|
|
45
|
+
__exportStar(require("./apiKeys/types"), exports);
|
|
46
|
+
__exportStar(require("./messages/client/requests"), exports);
|
|
47
|
+
__exportStar(require("./siMs/client/requests"), exports);
|
|
48
|
+
__exportStar(require("./apiKeys/client/requests"), exports);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as UnlimitedMessagingApi from "../../../index";
|
|
7
|
+
export declare namespace Messages {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.UnlimitedMessagingApiEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token: core.Supplier<core.BearerToken>;
|
|
13
|
+
}
|
|
14
|
+
interface RequestOptions {
|
|
15
|
+
/** The maximum time to wait for a response in seconds. */
|
|
16
|
+
timeoutInSeconds?: number;
|
|
17
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
18
|
+
maxRetries?: number;
|
|
19
|
+
/** A hook to abort the request. */
|
|
20
|
+
abortSignal?: AbortSignal;
|
|
21
|
+
/** Additional headers to include in the request. */
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Send and retrieve WhatsApp messages.
|
|
27
|
+
*/
|
|
28
|
+
export declare class Messages {
|
|
29
|
+
protected readonly _options: Messages.Options;
|
|
30
|
+
constructor(_options: Messages.Options);
|
|
31
|
+
/**
|
|
32
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ
|
|
33
|
+
*
|
|
34
|
+
* Returns a paginated list of messages for the authenticated user. Supports filtering by `status`, `simId`, and free-text `search`. Results are ordered by creation date (most recent first). Use `page` (default 1) and `limit` (1–100, default 20) to paginate.
|
|
35
|
+
*
|
|
36
|
+
* @param {UnlimitedMessagingApi.MessageFindAllRequest} request
|
|
37
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link UnlimitedMessagingApi.BadRequestError}
|
|
40
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
41
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.messages.messageFindAll({
|
|
45
|
+
* page: 1,
|
|
46
|
+
* limit: 1
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
messageFindAll(request: UnlimitedMessagingApi.MessageFindAllRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<UnlimitedMessagingApi.MessageFindAllResponse>;
|
|
50
|
+
private __messageFindAll;
|
|
51
|
+
/**
|
|
52
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:WRITE
|
|
53
|
+
*
|
|
54
|
+
* Queues a WhatsApp message for delivery to the specified `recipient` phone number (E.164 format). If `simId` is omitted, the platform resolves a SIM automatically using this priority order: (1) if the caller has exactly one active SIM, it is used; (2) if the caller has no SIM, the shared system SIM is used as fallback; (3) if the caller has multiple active SIMs, a `400` is returned asking to specify `simId`. Returns `404` if no SIM is available at all. Message text is limited to 1 600 characters.
|
|
55
|
+
*
|
|
56
|
+
* @param {UnlimitedMessagingApi.MessageSendRequest} request
|
|
57
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link UnlimitedMessagingApi.BadRequestError}
|
|
60
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
61
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
62
|
+
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
63
|
+
* @throws {@link UnlimitedMessagingApi.UnprocessableEntityError}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* await client.messages.messageSend({
|
|
67
|
+
* recipient: "recipient",
|
|
68
|
+
* text: "text"
|
|
69
|
+
* })
|
|
70
|
+
*/
|
|
71
|
+
messageSend(request: UnlimitedMessagingApi.MessageSendRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<UnlimitedMessagingApi.MessageSendResponse>;
|
|
72
|
+
private __messageSend;
|
|
73
|
+
/**
|
|
74
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ
|
|
75
|
+
*
|
|
76
|
+
* Returns a single message by its unique identifier. Returns 404 if the message is not found or does not belong to the authenticated user.
|
|
77
|
+
*
|
|
78
|
+
* @param {string} id
|
|
79
|
+
* @param {UnlimitedMessagingApi.MessageFindOneRequest} request
|
|
80
|
+
* @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
83
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
84
|
+
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* await client.messages.messageFindOne("id")
|
|
88
|
+
*/
|
|
89
|
+
messageFindOne(id: string, request?: UnlimitedMessagingApi.MessageFindOneRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<UnlimitedMessagingApi.MessageFindOneResponse>;
|
|
90
|
+
private __messageFindOne;
|
|
91
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
92
|
+
}
|