@sinch/provisioning 1.6.0
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/README.md +57 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +18 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/v1/index.d.ts +12 -0
- package/dist/models/v1/index.js +29 -0
- package/dist/models/v1/index.js.map +1 -0
- package/dist/models/v1/list-account-notifications-response/index.d.ts +1 -0
- package/dist/models/v1/list-account-notifications-response/index.js +18 -0
- package/dist/models/v1/list-account-notifications-response/index.js.map +1 -0
- package/dist/models/v1/list-account-notifications-response/list-account-notifications-response.d.ts +13 -0
- package/dist/models/v1/list-account-notifications-response/list-account-notifications-response.js +3 -0
- package/dist/models/v1/list-account-notifications-response/list-account-notifications-response.js.map +1 -0
- package/dist/models/v1/list-webhooks-response/index.d.ts +1 -0
- package/dist/models/v1/list-webhooks-response/index.js +18 -0
- package/dist/models/v1/list-webhooks-response/index.js.map +1 -0
- package/dist/models/v1/list-webhooks-response/list-webhooks-response.d.ts +13 -0
- package/dist/models/v1/list-webhooks-response/list-webhooks-response.js +3 -0
- package/dist/models/v1/list-webhooks-response/list-webhooks-response.js.map +1 -0
- package/dist/models/v1/rcs-account-notification/index.d.ts +1 -0
- package/dist/models/v1/rcs-account-notification/index.js +18 -0
- package/dist/models/v1/rcs-account-notification/index.js.map +1 -0
- package/dist/models/v1/rcs-account-notification/rcs-account-notification.d.ts +11 -0
- package/dist/models/v1/rcs-account-notification/rcs-account-notification.js +3 -0
- package/dist/models/v1/rcs-account-notification/rcs-account-notification.js.map +1 -0
- package/dist/models/v1/rcs-account-notification-type/index.d.ts +1 -0
- package/dist/models/v1/rcs-account-notification-type/index.js +18 -0
- package/dist/models/v1/rcs-account-notification-type/index.js.map +1 -0
- package/dist/models/v1/rcs-account-notification-type/rcs-account-notification-type.d.ts +4 -0
- package/dist/models/v1/rcs-account-notification-type/rcs-account-notification-type.js +3 -0
- package/dist/models/v1/rcs-account-notification-type/rcs-account-notification-type.js.map +1 -0
- package/dist/models/v1/rcs-comment/index.d.ts +1 -0
- package/dist/models/v1/rcs-comment/index.js +18 -0
- package/dist/models/v1/rcs-comment/index.js.map +1 -0
- package/dist/models/v1/rcs-comment/rcs-comment.d.ts +9 -0
- package/dist/models/v1/rcs-comment/rcs-comment.js +3 -0
- package/dist/models/v1/rcs-comment/rcs-comment.js.map +1 -0
- package/dist/models/v1/rcs-comment-create-request/index.d.ts +1 -0
- package/dist/models/v1/rcs-comment-create-request/index.js +18 -0
- package/dist/models/v1/rcs-comment-create-request/index.js.map +1 -0
- package/dist/models/v1/rcs-comment-create-request/rcs-comment-create-request.d.ts +4 -0
- package/dist/models/v1/rcs-comment-create-request/rcs-comment-create-request.js +3 -0
- package/dist/models/v1/rcs-comment-create-request/rcs-comment-create-request.js.map +1 -0
- package/dist/models/v1/rcs-comment-type/index.d.ts +1 -0
- package/dist/models/v1/rcs-comment-type/index.js +18 -0
- package/dist/models/v1/rcs-comment-type/index.js.map +1 -0
- package/dist/models/v1/rcs-comment-type/rcs-comment-type.d.ts +4 -0
- package/dist/models/v1/rcs-comment-type/rcs-comment-type.js +3 -0
- package/dist/models/v1/rcs-comment-type/rcs-comment-type.js.map +1 -0
- package/dist/models/v1/requests/index.d.ts +2 -0
- package/dist/models/v1/requests/index.js +19 -0
- package/dist/models/v1/requests/index.js.map +1 -0
- package/dist/models/v1/requests/rcs/accounts/accounts-request-data.d.ts +11 -0
- package/dist/models/v1/requests/rcs/accounts/accounts-request-data.js +3 -0
- package/dist/models/v1/requests/rcs/accounts/accounts-request-data.js.map +1 -0
- package/dist/models/v1/requests/rcs/accounts/index.d.ts +1 -0
- package/dist/models/v1/requests/rcs/accounts/index.js +18 -0
- package/dist/models/v1/requests/rcs/accounts/index.js.map +1 -0
- package/dist/models/v1/requests/rcs/index.d.ts +1 -0
- package/dist/models/v1/requests/rcs/index.js +18 -0
- package/dist/models/v1/requests/rcs/index.js.map +1 -0
- package/dist/models/v1/requests/webhooks/index.d.ts +1 -0
- package/dist/models/v1/requests/webhooks/index.js +18 -0
- package/dist/models/v1/requests/webhooks/index.js.map +1 -0
- package/dist/models/v1/requests/webhooks/webhooks-request-data.d.ts +32 -0
- package/dist/models/v1/requests/webhooks/webhooks-request-data.js +3 -0
- package/dist/models/v1/requests/webhooks/webhooks-request-data.js.map +1 -0
- package/dist/models/v1/webhook/index.d.ts +1 -0
- package/dist/models/v1/webhook/index.js +18 -0
- package/dist/models/v1/webhook/index.js.map +1 -0
- package/dist/models/v1/webhook/webhook.d.ts +11 -0
- package/dist/models/v1/webhook/webhook.js +3 -0
- package/dist/models/v1/webhook/webhook.js.map +1 -0
- package/dist/models/v1/webhook-create-request/index.d.ts +1 -0
- package/dist/models/v1/webhook-create-request/index.js +18 -0
- package/dist/models/v1/webhook-create-request/index.js.map +1 -0
- package/dist/models/v1/webhook-create-request/webhook-create-request.d.ts +9 -0
- package/dist/models/v1/webhook-create-request/webhook-create-request.js +3 -0
- package/dist/models/v1/webhook-create-request/webhook-create-request.js.map +1 -0
- package/dist/models/v1/webhook-trigger/index.d.ts +1 -0
- package/dist/models/v1/webhook-trigger/index.js +18 -0
- package/dist/models/v1/webhook-trigger/index.js.map +1 -0
- package/dist/models/v1/webhook-trigger/webhook-trigger.d.ts +4 -0
- package/dist/models/v1/webhook-trigger/webhook-trigger.js +3 -0
- package/dist/models/v1/webhook-trigger/webhook-trigger.js.map +1 -0
- package/dist/models/v1/webhook-update-request/index.d.ts +1 -0
- package/dist/models/v1/webhook-update-request/index.js +18 -0
- package/dist/models/v1/webhook-update-request/index.js.map +1 -0
- package/dist/models/v1/webhook-update-request/webhook-update-request.d.ts +9 -0
- package/dist/models/v1/webhook-update-request/webhook-update-request.js +3 -0
- package/dist/models/v1/webhook-update-request/webhook-update-request.js.map +1 -0
- package/dist/rest/index.d.ts +1 -0
- package/dist/rest/index.js +18 -0
- package/dist/rest/index.js.map +1 -0
- package/dist/rest/v1/index.d.ts +4 -0
- package/dist/rest/v1/index.js +24 -0
- package/dist/rest/v1/index.js.map +1 -0
- package/dist/rest/v1/provisioning-domain-api.d.ts +18 -0
- package/dist/rest/v1/provisioning-domain-api.js +42 -0
- package/dist/rest/v1/provisioning-domain-api.js.map +1 -0
- package/dist/rest/v1/provisioning-service.d.ts +24 -0
- package/dist/rest/v1/provisioning-service.js +62 -0
- package/dist/rest/v1/provisioning-service.js.map +1 -0
- package/dist/rest/v1/rcs/accounts/accounts-api.d.ts +20 -0
- package/dist/rest/v1/rcs/accounts/accounts-api.jest.fixture.d.ts +7 -0
- package/dist/rest/v1/rcs/accounts/accounts-api.jest.fixture.js +11 -0
- package/dist/rest/v1/rcs/accounts/accounts-api.jest.fixture.js.map +1 -0
- package/dist/rest/v1/rcs/accounts/accounts-api.js +61 -0
- package/dist/rest/v1/rcs/accounts/accounts-api.js.map +1 -0
- package/dist/rest/v1/rcs/accounts/index.d.ts +2 -0
- package/dist/rest/v1/rcs/accounts/index.js +19 -0
- package/dist/rest/v1/rcs/accounts/index.js.map +1 -0
- package/dist/rest/v1/rcs/index.d.ts +2 -0
- package/dist/rest/v1/rcs/index.js +19 -0
- package/dist/rest/v1/rcs/index.js.map +1 -0
- package/dist/rest/v1/rcs/rcs-api.d.ts +9 -0
- package/dist/rest/v1/rcs/rcs-api.js +14 -0
- package/dist/rest/v1/rcs/rcs-api.js.map +1 -0
- package/dist/rest/v1/webhooks/index.d.ts +2 -0
- package/dist/rest/v1/webhooks/index.js +19 -0
- package/dist/rest/v1/webhooks/index.js.map +1 -0
- package/dist/rest/v1/webhooks/webhooks-api.d.ts +44 -0
- package/dist/rest/v1/webhooks/webhooks-api.jest.fixture.d.ts +11 -0
- package/dist/rest/v1/webhooks/webhooks-api.jest.fixture.js +15 -0
- package/dist/rest/v1/webhooks/webhooks-api.jest.fixture.js.map +1 -0
- package/dist/rest/v1/webhooks/webhooks-api.js +153 -0
- package/dist/rest/v1/webhooks/webhooks-api.js.map +1 -0
- package/package.json +43 -0
|
@@ -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("./webhooks-request-data"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/models/v1/requests/webhooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { WebhookCreateRequest } from '../../webhook-create-request';
|
|
2
|
+
import { WebhookUpdateRequest } from '../../webhook-update-request';
|
|
3
|
+
export interface ListWebhooksRequestData {
|
|
4
|
+
/** The page token if retrieving the next page from a previous query. */
|
|
5
|
+
pageToken?: string;
|
|
6
|
+
/** The page size requested (1-15). */
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateWebhookRequestData {
|
|
10
|
+
/** Webhook to register */
|
|
11
|
+
webhookCreateRequestBody: WebhookCreateRequest;
|
|
12
|
+
}
|
|
13
|
+
export interface GetWebhookRequestData {
|
|
14
|
+
/** The unique ID of the webhook. */
|
|
15
|
+
webhookId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DeleteWebhookRequestData {
|
|
18
|
+
/** The unique ID of the webhook. */
|
|
19
|
+
webhookId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ReplaceWebhookRequestData {
|
|
22
|
+
/** The unique ID of the webhook. */
|
|
23
|
+
webhookId: string;
|
|
24
|
+
/** Webhook to replace */
|
|
25
|
+
webhookReplaceRequestBody: WebhookCreateRequest;
|
|
26
|
+
}
|
|
27
|
+
export interface UpdateWebhookRequestData {
|
|
28
|
+
/** The unique ID of the webhook. */
|
|
29
|
+
webhookId: string;
|
|
30
|
+
/** Webhook to update */
|
|
31
|
+
webhookUpdateRequestBody: WebhookUpdateRequest;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks-request-data.js","sourceRoot":"","sources":["../../../../../src/models/v1/requests/webhooks/webhooks-request-data.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './webhook';
|
|
@@ -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("./webhook"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/webhook/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WebhookTrigger } from '../webhook-trigger';
|
|
2
|
+
export interface Webhook {
|
|
3
|
+
/** The ID of the webhook. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The target url where events will be sent to. */
|
|
6
|
+
target: string;
|
|
7
|
+
/** The project that this webhook belongs to. */
|
|
8
|
+
projectId: string;
|
|
9
|
+
/** List of triggers this webhook is triggered by. */
|
|
10
|
+
triggers: WebhookTrigger[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../../src/models/v1/webhook/webhook.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './webhook-create-request';
|
|
@@ -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("./webhook-create-request"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/webhook-create-request/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WebhookTrigger } from '../webhook-trigger';
|
|
2
|
+
export interface WebhookCreateRequest {
|
|
3
|
+
/** A valid target url where events should be sent to. */
|
|
4
|
+
target: string;
|
|
5
|
+
/** Secret to be used to sign contents of webhooks sent by the provisioning API. */
|
|
6
|
+
secret: string;
|
|
7
|
+
/** List of triggers you want to be notified about on your webhook. */
|
|
8
|
+
triggers: WebhookTrigger[];
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-create-request.js","sourceRoot":"","sources":["../../../../src/models/v1/webhook-create-request/webhook-create-request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './webhook-trigger';
|
|
@@ -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("./webhook-trigger"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/webhook-trigger/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of triggers this webhook is triggered by.
|
|
3
|
+
*/
|
|
4
|
+
export type WebhookTrigger = 'ALL' | 'BUNDLE_DONE' | 'KAKAOTALK_SENDER_ACTIVE' | 'KAKAOTALK_SENDER_COMMENT_ADDED' | 'KAKAOTALK_SENDER_INACTIVE' | 'KAKAOTALK_SENDER_REJECTED' | 'KAKAOTALK_TEMPLATE_APPROVED' | 'KAKAOTALK_TEMPLATE_COMMENT_ADDED' | 'KAKAOTALK_TEMPLATE_REJECTED' | 'RCS_BRAND_REGISTRATION_PROCESS_STATUS_UPDATED' | 'RCS_SENDER_COMMENT_ADDED' | 'RCS_SENDER_OPERATOR_STATUS_UPDATED' | 'RCS_SENDER_STATUS_UPDATED' | 'RCS_ACCOUNT_COMMENT_ADDED' | 'WHATSAPP_ACCOUNT_COMMENT_ADDED' | 'WHATSAPP_ACCOUNT_DAILY_LIMIT_CHANGED' | 'WHATSAPP_ACCOUNT_ONBOARDED' | 'WHATSAPP_ACCOUNT_PENDING_VERIFICATION' | 'WHATSAPP_ACCOUNT_REJECTED' | 'WHATSAPP_WABA_ACCOUNT_CHANGED' | 'WHATSAPP_SENDER_ACTIVE' | 'WHATSAPP_SENDER_COMMENT_ADDED' | 'WHATSAPP_SENDER_DAILY_LIMIT_CHANGED' | 'WHATSAPP_SENDER_DELETED' | 'WHATSAPP_SENDER_ERROR' | 'WHATSAPP_SENDER_INACTIVE' | 'WHATSAPP_SENDER_PENDING_VERIFICATION' | 'WHATSAPP_SENDER_QUALITY_RATING_CHANGED' | 'WHATSAPP_SENDER_REJECTED' | 'WHATSAPP_TEMPLATE_APPROVED' | 'WHATSAPP_TEMPLATE_CATEGORY_FUTURE_UPDATE' | 'WHATSAPP_TEMPLATE_CATEGORY_UPDATED' | 'WHATSAPP_TEMPLATE_COMMENT_ADDED' | 'WHATSAPP_TEMPLATE_DELETED' | 'WHATSAPP_TEMPLATE_QUALITY_SCORE_UPDATED' | 'WHATSAPP_TEMPLATE_REJECTED' | 'WHATSAPP_TEMPLATE_STATUS_UPDATED' | string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-trigger.js","sourceRoot":"","sources":["../../../../src/models/v1/webhook-trigger/webhook-trigger.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './webhook-update-request';
|
|
@@ -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("./webhook-update-request"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/webhook-update-request/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WebhookTrigger } from '../webhook-trigger';
|
|
2
|
+
export interface WebhookUpdateRequest {
|
|
3
|
+
/** A valid target url where events should be sent to. */
|
|
4
|
+
target?: string;
|
|
5
|
+
/** Secret to be used to sign contents of webhooks sent by the provisioning API. */
|
|
6
|
+
secret?: string;
|
|
7
|
+
/** List of triggers you want to be notified about on your webhook. */
|
|
8
|
+
triggers?: WebhookTrigger[];
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-update-request.js","sourceRoot":"","sources":["../../../../src/models/v1/webhook-update-request/webhook-update-request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './v1';
|
|
@@ -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("./v1"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rest/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAqB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
exports.ProvisioningWebhooksApiFixture = exports.ProvisioningWebhooksApi = void 0;
|
|
18
|
+
__exportStar(require("./provisioning-domain-api"), exports);
|
|
19
|
+
__exportStar(require("./provisioning-service"), exports);
|
|
20
|
+
__exportStar(require("./rcs"), exports);
|
|
21
|
+
var webhooks_1 = require("./webhooks");
|
|
22
|
+
Object.defineProperty(exports, "ProvisioningWebhooksApi", { enumerable: true, get: function () { return webhooks_1.WebhooksApi; } });
|
|
23
|
+
Object.defineProperty(exports, "ProvisioningWebhooksApiFixture", { enumerable: true, get: function () { return webhooks_1.WebhooksApiFixture; } });
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rest/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,yDAAuC;AACvC,wCAAsB;AACtB,uCAGoB;AAFlB,mHAAA,WAAW,OAA2B;AACtC,0HAAA,kBAAkB,OAAkC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Api, ApiClient, UnifiedCredentials } from '@sinch/sdk-client';
|
|
2
|
+
import { LazyProvisioningApiClient } from './provisioning-service';
|
|
3
|
+
export declare class ProvisioningDomainApi implements Api {
|
|
4
|
+
readonly lazyClient: LazyProvisioningApiClient;
|
|
5
|
+
readonly apiName: string;
|
|
6
|
+
constructor(lazyClient: LazyProvisioningApiClient, apiName: string);
|
|
7
|
+
get client(): ApiClient;
|
|
8
|
+
/**
|
|
9
|
+
* Update the default hostname for the API
|
|
10
|
+
* @param {string} hostname - The new hostname to use for the APIs.
|
|
11
|
+
*/
|
|
12
|
+
setHostname(hostname: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* Updates the credentials used to authenticate API requests
|
|
15
|
+
* @param {UnifiedCredentials} credentials
|
|
16
|
+
*/
|
|
17
|
+
setCredentials(credentials: Partial<UnifiedCredentials>): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProvisioningDomainApi = void 0;
|
|
4
|
+
class ProvisioningDomainApi {
|
|
5
|
+
constructor(lazyClient, apiName) {
|
|
6
|
+
this.lazyClient = lazyClient;
|
|
7
|
+
this.apiName = apiName;
|
|
8
|
+
}
|
|
9
|
+
get client() {
|
|
10
|
+
return this.lazyClient.getApiClient();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Update the default hostname for the API
|
|
14
|
+
* @param {string} hostname - The new hostname to use for the APIs.
|
|
15
|
+
*/
|
|
16
|
+
setHostname(hostname) {
|
|
17
|
+
this.lazyClient.sharedConfig.provisioningHostname = hostname;
|
|
18
|
+
this.lazyClient.getApiClient().apiClientOptions.hostname = hostname;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Updates the credentials used to authenticate API requests
|
|
22
|
+
* @param {UnifiedCredentials} credentials
|
|
23
|
+
*/
|
|
24
|
+
setCredentials(credentials) {
|
|
25
|
+
const parametersBackup = { ...this.lazyClient.sharedConfig };
|
|
26
|
+
this.lazyClient.sharedConfig = {
|
|
27
|
+
...parametersBackup,
|
|
28
|
+
...credentials,
|
|
29
|
+
};
|
|
30
|
+
this.lazyClient.resetApiClient();
|
|
31
|
+
try {
|
|
32
|
+
this.lazyClient.getApiClient();
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
console.error('Impossible to assign the new credentials to the Provisioning API');
|
|
36
|
+
this.lazyClient.sharedConfig = parametersBackup;
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.ProvisioningDomainApi = ProvisioningDomainApi;
|
|
42
|
+
//# sourceMappingURL=provisioning-domain-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provisioning-domain-api.js","sourceRoot":"","sources":["../../../src/rest/v1/provisioning-domain-api.ts"],"names":[],"mappings":";;;AAOA;IAEE,YACkB,UAAqC,EACrC,OAAe;0BADf,UAAU;uBACV,OAAO;IACtB,CAAC;IAEJ,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;IACxC,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,QAAgB;QACjC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,oBAAoB,GAAG,QAAQ,CAAC;QAC7D,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,gBAAgB,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,cAAc,CAAC,WAAwC;QAC5D,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QAC7D,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG;YAC7B,GAAG,gBAAgB;YACnB,GAAG,WAAW;SACf,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAClF,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;YAChD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CAEF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ApiFetchClient, SinchClientParameters, UnifiedCredentials } from '@sinch/sdk-client';
|
|
2
|
+
import { RcsApi } from './rcs';
|
|
3
|
+
import { WebhooksApi } from './webhooks';
|
|
4
|
+
export declare class LazyProvisioningApiClient {
|
|
5
|
+
sharedConfig: SinchClientParameters;
|
|
6
|
+
apiFetchClient?: ApiFetchClient;
|
|
7
|
+
constructor(sharedConfig: SinchClientParameters);
|
|
8
|
+
getApiClient(): ApiFetchClient;
|
|
9
|
+
resetApiClient(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class ProvisioningService {
|
|
12
|
+
readonly rcs: RcsApi;
|
|
13
|
+
readonly webhooks: WebhooksApi;
|
|
14
|
+
readonly lazyClient: LazyProvisioningApiClient;
|
|
15
|
+
constructor(params: SinchClientParameters);
|
|
16
|
+
setApiClientConfig(newParams: SinchClientParameters): void;
|
|
17
|
+
/**
|
|
18
|
+
* Update the default hostname for each API
|
|
19
|
+
*
|
|
20
|
+
* @param {string} hostname - The new hostname to use for all the APIs.
|
|
21
|
+
*/
|
|
22
|
+
setHostname(hostname: string): void;
|
|
23
|
+
setCredentials(credentials: Partial<UnifiedCredentials>): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProvisioningService = exports.LazyProvisioningApiClient = void 0;
|
|
4
|
+
const sdk_client_1 = require("@sinch/sdk-client");
|
|
5
|
+
const rcs_1 = require("./rcs");
|
|
6
|
+
const webhooks_1 = require("./webhooks");
|
|
7
|
+
class LazyProvisioningApiClient {
|
|
8
|
+
constructor(sharedConfig) {
|
|
9
|
+
this.sharedConfig = sharedConfig;
|
|
10
|
+
}
|
|
11
|
+
getApiClient() {
|
|
12
|
+
if (!this.apiFetchClient) {
|
|
13
|
+
const apiClientOptions = (0, sdk_client_1.buildOAuth2ApiClientOptions)(this.sharedConfig, 'Provisioning');
|
|
14
|
+
this.apiFetchClient = new sdk_client_1.ApiFetchClient(apiClientOptions);
|
|
15
|
+
this.apiFetchClient.apiClientOptions.hostname = this.sharedConfig.provisioningHostname ?? sdk_client_1.PROVISIONING_HOSTNAME;
|
|
16
|
+
}
|
|
17
|
+
return this.apiFetchClient;
|
|
18
|
+
}
|
|
19
|
+
resetApiClient() {
|
|
20
|
+
this.apiFetchClient = undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.LazyProvisioningApiClient = LazyProvisioningApiClient;
|
|
24
|
+
class ProvisioningService {
|
|
25
|
+
constructor(params) {
|
|
26
|
+
const sharedClient = new LazyProvisioningApiClient(params);
|
|
27
|
+
this.lazyClient = sharedClient;
|
|
28
|
+
this.rcs = new rcs_1.RcsApi(sharedClient);
|
|
29
|
+
this.webhooks = new webhooks_1.WebhooksApi(sharedClient);
|
|
30
|
+
}
|
|
31
|
+
setApiClientConfig(newParams) {
|
|
32
|
+
this.lazyClient.sharedConfig = newParams;
|
|
33
|
+
this.lazyClient.resetApiClient();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Update the default hostname for each API
|
|
37
|
+
*
|
|
38
|
+
* @param {string} hostname - The new hostname to use for all the APIs.
|
|
39
|
+
*/
|
|
40
|
+
setHostname(hostname) {
|
|
41
|
+
this.lazyClient.sharedConfig.provisioningHostname = hostname;
|
|
42
|
+
this.lazyClient.getApiClient().apiClientOptions.hostname = hostname;
|
|
43
|
+
}
|
|
44
|
+
setCredentials(credentials) {
|
|
45
|
+
const parametersBackup = { ...this.lazyClient.sharedConfig };
|
|
46
|
+
this.lazyClient.sharedConfig = {
|
|
47
|
+
...parametersBackup,
|
|
48
|
+
...credentials,
|
|
49
|
+
};
|
|
50
|
+
this.lazyClient.resetApiClient();
|
|
51
|
+
try {
|
|
52
|
+
this.lazyClient.getApiClient();
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
console.error('Impossible to assign the new credentials to the Provisioning API');
|
|
56
|
+
this.lazyClient.sharedConfig = parametersBackup;
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.ProvisioningService = ProvisioningService;
|
|
62
|
+
//# sourceMappingURL=provisioning-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provisioning-service.js","sourceRoot":"","sources":["../../../src/rest/v1/provisioning-service.ts"],"names":[],"mappings":";;;AAAA,kDAM2B;AAC3B,+BAA+B;AAC/B,yCAAyC;AAEzC;IAEE,YAAmB,YAAmC;4BAAnC,YAAY;IAA0B,CAAC;IAEnD,YAAY;QACjB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,MAAM,gBAAgB,GAAG,IAAA,wCAA2B,EAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;YACxF,IAAI,CAAC,cAAc,GAAG,IAAI,2BAAc,CAAC,gBAAgB,CAAC,CAAC;YAC3D,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,oBAAoB,IAAI,kCAAqB,CAAC;QAClH,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,cAAc;QACnB,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;IAClC,CAAC;CACF;;AAED;IAKE,YAAY,MAA6B;QACvC,MAAM,YAAY,GAAG,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;QAC/B,IAAI,CAAC,GAAG,GAAG,IAAI,YAAM,CAAC,YAAY,CAAC,CAAC;QACpC,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAW,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IAEM,kBAAkB,CAAC,SAAgC;QACxD,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,QAAgB;QACjC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,oBAAoB,GAAG,QAAQ,CAAC;QAC7D,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,gBAAgB,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACtE,CAAC;IAEM,cAAc,CAAC,WAAwC;QAC5D,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QAC7D,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG;YAC7B,GAAG,gBAAgB;YACnB,GAAG,WAAW;SACf,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAClF,IAAI,CAAC,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;YAChD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApiListPromise } from '@sinch/sdk-client';
|
|
2
|
+
import { CreateCommentRequestData, ListActivitiesRequestData, RcsAccountNotification, RcsComment } from '../../../../models';
|
|
3
|
+
import { ProvisioningDomainApi } from '../../provisioning-domain-api';
|
|
4
|
+
import { LazyProvisioningApiClient } from '../../provisioning-service';
|
|
5
|
+
export declare class RcsAccountsApi extends ProvisioningDomainApi {
|
|
6
|
+
constructor(lazyApiClient: LazyProvisioningApiClient);
|
|
7
|
+
/**
|
|
8
|
+
* Creates a comment for an account
|
|
9
|
+
* Creates a comment for an RCS account.
|
|
10
|
+
* @param { CreateCommentRequestData } data - The data to provide to the API call.
|
|
11
|
+
*/
|
|
12
|
+
createComment(data: CreateCommentRequestData): Promise<RcsComment>;
|
|
13
|
+
/**
|
|
14
|
+
* Lists activities on account
|
|
15
|
+
* Paginated list of activities for an RCS account. Ordered from the most recent one to the oldest one.
|
|
16
|
+
* @param { ListActivitiesRequestData } data - The data to provide to the API call.
|
|
17
|
+
* @return {ApiListPromise<RcsAccountNotification>}
|
|
18
|
+
*/
|
|
19
|
+
listActivities(data?: ListActivitiesRequestData): ApiListPromise<RcsAccountNotification>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RcsAccountsApi } from './accounts-api';
|
|
2
|
+
import { CreateCommentRequestData, ListActivitiesRequestData, RcsAccountNotification, RcsComment } from '../../../../models';
|
|
3
|
+
import { ApiListPromise } from '@sinch/sdk-client';
|
|
4
|
+
export declare class RcsAccountsApiFixture implements Partial<Readonly<RcsAccountsApi>> {
|
|
5
|
+
createComment: jest.Mock<Promise<RcsComment>, [CreateCommentRequestData]>;
|
|
6
|
+
listActivities: jest.Mock<ApiListPromise<RcsAccountNotification>, [ListActivitiesRequestData?]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RcsAccountsApiFixture = void 0;
|
|
4
|
+
class RcsAccountsApiFixture {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.createComment = jest.fn();
|
|
7
|
+
this.listActivities = jest.fn();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.RcsAccountsApiFixture = RcsAccountsApiFixture;
|
|
11
|
+
//# sourceMappingURL=accounts-api.jest.fixture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts-api.jest.fixture.js","sourceRoot":"","sources":["../../../../../src/rest/v1/rcs/accounts/accounts-api.jest.fixture.ts"],"names":[],"mappings":";;;AASA;IAAA;QAES,kBAAa,GAA+D,IAAI,CAAC,EAAE,EAAE,CAAC;QACtF,mBAAc,GAAoF,IAAI,CAAC,EAAE,EAAE,CAAC;IACrH,CAAC;CAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RcsAccountsApi = void 0;
|
|
4
|
+
const sdk_client_1 = require("@sinch/sdk-client");
|
|
5
|
+
const provisioning_domain_api_1 = require("../../provisioning-domain-api");
|
|
6
|
+
class RcsAccountsApi extends provisioning_domain_api_1.ProvisioningDomainApi {
|
|
7
|
+
constructor(lazyApiClient) {
|
|
8
|
+
super(lazyApiClient, 'RcsAccountsApi');
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Creates a comment for an account
|
|
12
|
+
* Creates a comment for an RCS account.
|
|
13
|
+
* @param { CreateCommentRequestData } data - The data to provide to the API call.
|
|
14
|
+
*/
|
|
15
|
+
async createComment(data) {
|
|
16
|
+
const getParams = this.client.extractQueryParams(data, []);
|
|
17
|
+
const headers = {
|
|
18
|
+
'Content-Type': 'application/json',
|
|
19
|
+
Accept: 'application/json',
|
|
20
|
+
};
|
|
21
|
+
const body = data['rcsCommentCreateRequestBody']
|
|
22
|
+
? JSON.stringify(data['rcsCommentCreateRequestBody'])
|
|
23
|
+
: '{}';
|
|
24
|
+
const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/rcs/comments`;
|
|
25
|
+
const requestOptions = await this.client.prepareOptions(basePathUrl, 'POST', getParams, headers, body || undefined);
|
|
26
|
+
const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
|
|
27
|
+
return this.client.processCall({
|
|
28
|
+
url,
|
|
29
|
+
requestOptions,
|
|
30
|
+
apiName: this.apiName,
|
|
31
|
+
operationId: 'createComment',
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Lists activities on account
|
|
36
|
+
* Paginated list of activities for an RCS account. Ordered from the most recent one to the oldest one.
|
|
37
|
+
* @param { ListActivitiesRequestData } data - The data to provide to the API call.
|
|
38
|
+
* @return {ApiListPromise<RcsAccountNotification>}
|
|
39
|
+
*/
|
|
40
|
+
listActivities(data) {
|
|
41
|
+
const getParams = this.client.extractQueryParams(data ?? {}, ['pageToken', 'pageSize']);
|
|
42
|
+
const headers = {
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
Accept: 'application/json',
|
|
45
|
+
};
|
|
46
|
+
const body = '';
|
|
47
|
+
const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/rcs/activities`;
|
|
48
|
+
const requestOptionsPromise = this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
|
|
49
|
+
const operationProperties = {
|
|
50
|
+
pagination: sdk_client_1.PaginationEnum.TOKEN,
|
|
51
|
+
apiName: this.apiName,
|
|
52
|
+
operationId: 'listActivities',
|
|
53
|
+
dataKey: 'notifications',
|
|
54
|
+
};
|
|
55
|
+
const listPromise = (0, sdk_client_1.buildPageResultPromise)(this.client, requestOptionsPromise, operationProperties);
|
|
56
|
+
Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
|
|
57
|
+
return listPromise;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.RcsAccountsApi = RcsAccountsApi;
|
|
61
|
+
//# sourceMappingURL=accounts-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts-api.js","sourceRoot":"","sources":["../../../../../src/rest/v1/rcs/accounts/accounts-api.ts"],"names":[],"mappings":";;;AAAA,kDAO2B;AAO3B,2EAAsE;AAGtE,oBAA4B,SAAQ,+CAAqB;IAEvD,YAAY,aAAwC;QAClD,KAAK,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,aAAa,CAAC,IAA8B;QACvD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAA2B,IAAI,EAAE,EAAa,CAAC,CAAC;QAChG,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,MAAM,EAAE,kBAAkB;SAC3B,CAAC;QAEF,MAAM,IAAI,GAAgB,IAAI,CAAC,6BAA6B,CAAC;YAC3D,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YACrD,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,eAAe,CAAC;QAElI,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QACpH,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAa;YACzC,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACI,cAAc,CAAC,IAAgC;QACpD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAC9C,IAAI,IAAI,EAAE,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;QACzC,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,MAAM,EAAE,kBAAkB;SAC3B,CAAC;QAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,iBAAiB,CAAC;QAEpI,MAAM,qBAAqB,GACvB,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QAE1F,MAAM,mBAAmB,GAA2B;YAClD,UAAU,EAAE,2BAAc,CAAC,KAAK;YAChC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,gBAAgB;YAC7B,OAAO,EAAE,eAAe;SACzB,CAAC;QAEF,MAAM,WAAW,GAAG,IAAA,mCAAsB,EACxC,IAAI,CAAC,MAAM,EACX,qBAAqB,EACrB,mBAAmB,CACpB,CAAC;QAEF,MAAM,CAAC,MAAM,CACX,WAAW,EACX,IAAA,+CAAkC,EAChC,IAAI,CAAC,MAAM,EAAE,qBAAqB,EAAE,WAAW,EAAE,mBAAmB,CAAC,CACxE,CAAC;QAEF,OAAO,WAAqD,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./accounts-api"), exports);
|
|
18
|
+
__exportStar(require("./accounts-api.jest.fixture"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/rest/v1/rcs/accounts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,8DAA4C"}
|