twilio 6.0.0 → 6.0.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.
- package/lib/rest/ConversationsBase.d.ts +3 -0
- package/lib/rest/ConversationsBase.js +5 -0
- package/lib/rest/InsightsBase.d.ts +3 -0
- package/lib/rest/InsightsBase.js +5 -0
- package/lib/rest/IntelligenceBase.d.ts +3 -0
- package/lib/rest/IntelligenceBase.js +5 -0
- package/lib/rest/KnowledgeBase.d.ts +3 -0
- package/lib/rest/KnowledgeBase.js +5 -0
- package/lib/rest/Memory.d.ts +4 -0
- package/lib/rest/Memory.js +8 -0
- package/lib/rest/MemoryBase.d.ts +13 -0
- package/lib/rest/MemoryBase.js +31 -0
- package/lib/rest/Twilio.d.ts +5 -0
- package/lib/rest/Twilio.js +5 -0
- package/lib/rest/VoiceBase.d.ts +3 -0
- package/lib/rest/VoiceBase.js +5 -0
- package/lib/rest/api/v2010/account/call/recording.d.ts +2 -0
- package/lib/rest/api/v2010/account/call/recording.js +4 -0
- package/lib/rest/api/v2010/account/call/transcription.d.ts +1 -1
- package/lib/rest/api/v2010/account/call/transcription.js +6 -4
- package/lib/rest/api/v2010/account/call.d.ts +2 -0
- package/lib/rest/api/v2010/account/call.js +4 -0
- package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
- package/lib/rest/api/v2010/account/conference/participant.js +4 -0
- package/lib/rest/conversations/V2.d.ts +35 -0
- package/lib/rest/conversations/V2.js +67 -0
- package/lib/rest/conversations/v2/communication.d.ts +479 -0
- package/lib/rest/conversations/v2/communication.js +436 -0
- package/lib/rest/conversations/v2/configuration.d.ts +906 -0
- package/lib/rest/conversations/v2/configuration.js +619 -0
- package/lib/rest/conversations/v2/conversation.d.ts +936 -0
- package/lib/rest/conversations/v2/conversation.js +664 -0
- package/lib/rest/conversations/v2/operation.d.ts +167 -0
- package/lib/rest/conversations/v2/operation.js +170 -0
- package/lib/rest/conversations/v2/participant.d.ts +469 -0
- package/lib/rest/conversations/v2/participant.js +442 -0
- package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +1 -1
- package/lib/rest/flexApi/v1/plugin/pluginVersions.js +8 -6
- package/lib/rest/insights/V3.d.ts +20 -0
- package/lib/rest/insights/V3.js +42 -0
- package/lib/rest/insights/v1/call/callSummary.d.ts +10 -10
- package/lib/rest/insights/v1/call/event.d.ts +4 -4
- package/lib/rest/insights/v1/callSummaries.d.ts +12 -9
- package/lib/rest/insights/v3/metadata.d.ts +115 -0
- package/lib/rest/insights/v3/metadata.js +118 -0
- package/lib/rest/insights/v3/query.d.ts +180 -0
- package/lib/rest/insights/v3/query.js +214 -0
- package/lib/rest/intelligence/V3.d.ts +35 -0
- package/lib/rest/intelligence/V3.js +65 -0
- package/lib/rest/intelligence/v3/configuration.d.ts +693 -0
- package/lib/rest/intelligence/v3/configuration.js +528 -0
- package/lib/rest/intelligence/v3/conversation.d.ts +478 -0
- package/lib/rest/intelligence/v3/conversation.js +342 -0
- package/lib/rest/intelligence/v3/operator.d.ts +619 -0
- package/lib/rest/intelligence/v3/operator.js +493 -0
- package/lib/rest/intelligence/v3/operatorResult.d.ts +543 -0
- package/lib/rest/intelligence/v3/operatorResult.js +478 -0
- package/lib/rest/intelligence/v3/version.d.ts +469 -0
- package/lib/rest/intelligence/v3/version.js +341 -0
- package/lib/rest/knowledge/V2.d.ts +31 -0
- package/lib/rest/knowledge/V2.js +62 -0
- package/lib/rest/knowledge/v2/chunk.d.ts +209 -0
- package/lib/rest/knowledge/v2/chunk.js +178 -0
- package/lib/rest/knowledge/v2/knowledge.d.ts +507 -0
- package/lib/rest/knowledge/v2/knowledge.js +466 -0
- package/lib/rest/knowledge/v2/knowledgeBasis.d.ts +484 -0
- package/lib/rest/knowledge/v2/knowledgeBasis.js +441 -0
- package/lib/rest/knowledge/v2/operation.d.ts +162 -0
- package/lib/rest/knowledge/v2/operation.js +175 -0
- package/lib/rest/knowledge/v2/search.d.ts +180 -0
- package/lib/rest/knowledge/v2/search.js +174 -0
- package/lib/rest/memory/V1.d.ts +76 -0
- package/lib/rest/memory/V1.js +140 -0
- package/lib/rest/memory/v1/bulk.d.ts +129 -0
- package/lib/rest/memory/v1/bulk.js +158 -0
- package/lib/rest/memory/v1/conversationSummary.d.ts +531 -0
- package/lib/rest/memory/v1/conversationSummary.js +473 -0
- package/lib/rest/memory/v1/dataMapping.d.ts +630 -0
- package/lib/rest/memory/v1/dataMapping.js +512 -0
- package/lib/rest/memory/v1/event.d.ts +153 -0
- package/lib/rest/memory/v1/event.js +159 -0
- package/lib/rest/memory/v1/identifier.d.ts +362 -0
- package/lib/rest/memory/v1/identifier.js +369 -0
- package/lib/rest/memory/v1/identityResolutionSetting.d.ts +247 -0
- package/lib/rest/memory/v1/identityResolutionSetting.js +229 -0
- package/lib/rest/memory/v1/import.d.ts +292 -0
- package/lib/rest/memory/v1/import.js +280 -0
- package/lib/rest/memory/v1/lookup.d.ts +82 -0
- package/lib/rest/memory/v1/lookup.js +118 -0
- package/lib/rest/memory/v1/observation.d.ts +521 -0
- package/lib/rest/memory/v1/observation.js +477 -0
- package/lib/rest/memory/v1/operation.d.ts +162 -0
- package/lib/rest/memory/v1/operation.js +175 -0
- package/lib/rest/memory/v1/profile.d.ts +441 -0
- package/lib/rest/memory/v1/profile.js +467 -0
- package/lib/rest/memory/v1/recall.d.ts +306 -0
- package/lib/rest/memory/v1/recall.js +234 -0
- package/lib/rest/memory/v1/revision.d.ts +246 -0
- package/lib/rest/memory/v1/revision.js +195 -0
- package/lib/rest/memory/v1/store.d.ts +503 -0
- package/lib/rest/memory/v1/store.js +482 -0
- package/lib/rest/memory/v1/trait.d.ts +233 -0
- package/lib/rest/memory/v1/trait.js +190 -0
- package/lib/rest/memory/v1/traitGroup.d.ts +758 -0
- package/lib/rest/memory/v1/traitGroup.js +555 -0
- package/lib/rest/messaging/v2/channelsSender.d.ts +8 -0
- package/lib/rest/messaging/v2/channelsSender.js +2 -0
- package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +32 -0
- package/lib/rest/previewIam/versionless/organization/roleAssignment.js +14 -0
- package/lib/rest/studio/v2/flow.d.ts +4 -0
- package/lib/rest/studio/v2/flow.js +8 -0
- package/lib/rest/verify/v2/service/webhook.d.ts +2 -2
- package/lib/rest/verify/v2/service/webhook.js +8 -8
- package/lib/rest/voice/V3.d.ts +15 -0
- package/lib/rest/voice/V3.js +37 -0
- package/lib/rest/voice/v3/transcription.d.ts +378 -0
- package/lib/rest/voice/v3/transcription.js +264 -0
- package/lib/twiml/VoiceResponse.d.ts +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio Memory API
|
|
9
|
+
* APIs for managing memory stores, profiles, events, and conversational intelligence capabilities.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.OperationInstance = exports.OperationContextImpl = exports.OperationStatusError = exports.OperationResultResourceId = void 0;
|
|
17
|
+
exports.OperationListInstance = OperationListInstance;
|
|
18
|
+
const util_1 = require("util");
|
|
19
|
+
const deserialize = require("../../../base/deserialize");
|
|
20
|
+
const serialize = require("../../../base/serialize");
|
|
21
|
+
const utility_1 = require("../../../base/utility");
|
|
22
|
+
class OperationResultResourceId {
|
|
23
|
+
constructor(payload) {
|
|
24
|
+
this.type = payload["type"];
|
|
25
|
+
this.id = payload["id"];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.OperationResultResourceId = OperationResultResourceId;
|
|
29
|
+
class OperationStatusError {
|
|
30
|
+
constructor(payload) {
|
|
31
|
+
this.type = payload["type"];
|
|
32
|
+
this.title = payload["title"];
|
|
33
|
+
this.code = payload["code"];
|
|
34
|
+
this.detail = payload["detail"];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.OperationStatusError = OperationStatusError;
|
|
38
|
+
class OperationContextImpl {
|
|
39
|
+
constructor(_version, operationId) {
|
|
40
|
+
this._version = _version;
|
|
41
|
+
if (!(0, utility_1.isValidPathParam)(operationId)) {
|
|
42
|
+
throw new Error("Parameter 'operationId' is not valid.");
|
|
43
|
+
}
|
|
44
|
+
this._solution = { operationId };
|
|
45
|
+
this._uri = `/ControlPlane/Operations/${operationId}`;
|
|
46
|
+
}
|
|
47
|
+
fetch(callback) {
|
|
48
|
+
const headers = {};
|
|
49
|
+
headers["Accept"] = "application/json";
|
|
50
|
+
const instance = this;
|
|
51
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
52
|
+
uri: instance._uri,
|
|
53
|
+
method: "get",
|
|
54
|
+
headers,
|
|
55
|
+
});
|
|
56
|
+
operationPromise = operationPromise.then((payload) => new OperationInstance(operationVersion, payload, instance._solution.operationId));
|
|
57
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
58
|
+
return operationPromise;
|
|
59
|
+
}
|
|
60
|
+
fetchWithHttpInfo(callback) {
|
|
61
|
+
const headers = {};
|
|
62
|
+
headers["Accept"] = "application/json";
|
|
63
|
+
const instance = this;
|
|
64
|
+
let operationVersion = instance._version;
|
|
65
|
+
// CREATE, FETCH, UPDATE operations
|
|
66
|
+
let operationPromise = operationVersion
|
|
67
|
+
.fetchWithResponseInfo({
|
|
68
|
+
uri: instance._uri,
|
|
69
|
+
method: "get",
|
|
70
|
+
headers,
|
|
71
|
+
})
|
|
72
|
+
.then((response) => ({
|
|
73
|
+
...response,
|
|
74
|
+
body: new OperationInstance(operationVersion, response.body, instance._solution.operationId),
|
|
75
|
+
}));
|
|
76
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
77
|
+
return operationPromise;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Provide a user-friendly representation
|
|
81
|
+
*
|
|
82
|
+
* @returns Object
|
|
83
|
+
*/
|
|
84
|
+
toJSON() {
|
|
85
|
+
return this._solution;
|
|
86
|
+
}
|
|
87
|
+
[util_1.inspect.custom](_depth, options) {
|
|
88
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.OperationContextImpl = OperationContextImpl;
|
|
92
|
+
class OperationInstance {
|
|
93
|
+
constructor(_version, _payload, operationId) {
|
|
94
|
+
this._version = _version;
|
|
95
|
+
const payload = _payload;
|
|
96
|
+
this.operationId = payload.operationId;
|
|
97
|
+
this.status = payload.status;
|
|
98
|
+
this.createdAt = deserialize.iso8601DateTime(payload.createdAt);
|
|
99
|
+
this.statusUrl = payload.statusUrl;
|
|
100
|
+
this.completedAt = deserialize.iso8601DateTime(payload.completedAt);
|
|
101
|
+
this.result =
|
|
102
|
+
payload.result !== null && payload.result !== undefined
|
|
103
|
+
? new OperationResultResourceId(payload.result)
|
|
104
|
+
: null;
|
|
105
|
+
this.error =
|
|
106
|
+
payload.error !== null && payload.error !== undefined
|
|
107
|
+
? new OperationStatusError(payload.error)
|
|
108
|
+
: null;
|
|
109
|
+
this.resultUrl = payload.resultUrl;
|
|
110
|
+
this._solution = { operationId: operationId };
|
|
111
|
+
}
|
|
112
|
+
get _proxy() {
|
|
113
|
+
this._context =
|
|
114
|
+
this._context ||
|
|
115
|
+
new OperationContextImpl(this._version, this._solution.operationId);
|
|
116
|
+
return this._context;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Fetch a OperationInstance
|
|
120
|
+
*
|
|
121
|
+
* @param callback - Callback to handle processed record
|
|
122
|
+
*
|
|
123
|
+
* @returns Resolves to processed OperationInstance
|
|
124
|
+
*/
|
|
125
|
+
fetch(callback) {
|
|
126
|
+
return this._proxy.fetch(callback);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Fetch a OperationInstance and return HTTP info
|
|
130
|
+
*
|
|
131
|
+
* @param callback - Callback to handle processed record
|
|
132
|
+
*
|
|
133
|
+
* @returns Resolves to processed OperationInstance with HTTP metadata
|
|
134
|
+
*/
|
|
135
|
+
fetchWithHttpInfo(callback) {
|
|
136
|
+
return this._proxy.fetchWithHttpInfo(callback);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Provide a user-friendly representation
|
|
140
|
+
*
|
|
141
|
+
* @returns Object
|
|
142
|
+
*/
|
|
143
|
+
toJSON() {
|
|
144
|
+
return {
|
|
145
|
+
operationId: this.operationId,
|
|
146
|
+
status: this.status,
|
|
147
|
+
createdAt: this.createdAt,
|
|
148
|
+
statusUrl: this.statusUrl,
|
|
149
|
+
completedAt: this.completedAt,
|
|
150
|
+
result: this.result,
|
|
151
|
+
error: this.error,
|
|
152
|
+
resultUrl: this.resultUrl,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
[util_1.inspect.custom](_depth, options) {
|
|
156
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.OperationInstance = OperationInstance;
|
|
160
|
+
function OperationListInstance(version) {
|
|
161
|
+
const instance = ((operationId) => instance.get(operationId));
|
|
162
|
+
instance.get = function get(operationId) {
|
|
163
|
+
return new OperationContextImpl(version, operationId);
|
|
164
|
+
};
|
|
165
|
+
instance._version = version;
|
|
166
|
+
instance._solution = {};
|
|
167
|
+
instance._uri = ``;
|
|
168
|
+
instance.toJSON = function toJSON() {
|
|
169
|
+
return instance._solution;
|
|
170
|
+
};
|
|
171
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
172
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
173
|
+
};
|
|
174
|
+
return instance;
|
|
175
|
+
}
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
import { inspect, InspectOptions } from "util";
|
|
2
|
+
import TokenPage, { TokenPaginationPayload } from "../../../base/TokenPage";
|
|
3
|
+
import Response from "../../../http/response";
|
|
4
|
+
import V1 from "../V1";
|
|
5
|
+
import { ApiResponse } from "../../../base/ApiResponse";
|
|
6
|
+
/**
|
|
7
|
+
* Data for creating or updating a profile, including traits.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ProfileData {
|
|
10
|
+
/**
|
|
11
|
+
* Multiple trait groups.
|
|
12
|
+
*/
|
|
13
|
+
"traits"?: {
|
|
14
|
+
[key: string]: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
constructor(payload: any);
|
|
19
|
+
}
|
|
20
|
+
export declare class ProfilePatch {
|
|
21
|
+
/**
|
|
22
|
+
* Multiple trait groups.
|
|
23
|
+
*/
|
|
24
|
+
"traits"?: {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
constructor(payload: any);
|
|
30
|
+
}
|
|
31
|
+
export declare class ProfilesMeta {
|
|
32
|
+
/**
|
|
33
|
+
* The key of the list property contains the actual data items. This enables programmatic iteration over paginated results.
|
|
34
|
+
*/
|
|
35
|
+
"key"?: string;
|
|
36
|
+
"pageSize"?: number;
|
|
37
|
+
"nextToken"?: string;
|
|
38
|
+
"previousToken"?: string;
|
|
39
|
+
constructor(payload: any);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Options to pass to patch a ProfileInstance
|
|
43
|
+
*/
|
|
44
|
+
export interface ProfileContextPatchOptions {
|
|
45
|
+
/** */
|
|
46
|
+
profilePatch: ProfilePatch;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Options to pass to create a ProfileInstance
|
|
50
|
+
*/
|
|
51
|
+
export interface ProfileListInstanceCreateOptions {
|
|
52
|
+
/** */
|
|
53
|
+
profileData: ProfileData;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Options to pass to each
|
|
57
|
+
*/
|
|
58
|
+
export interface ProfileListInstanceEachOptions {
|
|
59
|
+
/** The maximum number of items to return per page, maximum of 1000. */
|
|
60
|
+
pageSize?: number;
|
|
61
|
+
/** The token for the page of results to retrieve. */
|
|
62
|
+
pageToken?: string;
|
|
63
|
+
/** Either \'ASC\' or \'DESC\' to sort results ascending or descending respectively. */
|
|
64
|
+
orderBy?: "ASC" | "DESC";
|
|
65
|
+
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
66
|
+
callback?: (item: ProfileInstance, done: (err?: Error) => void) => void;
|
|
67
|
+
/** Function to be called upon completion of streaming */
|
|
68
|
+
done?: Function;
|
|
69
|
+
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
70
|
+
limit?: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Options to pass to list
|
|
74
|
+
*/
|
|
75
|
+
export interface ProfileListInstanceOptions {
|
|
76
|
+
/** The maximum number of items to return per page, maximum of 1000. */
|
|
77
|
+
pageSize?: number;
|
|
78
|
+
/** The token for the page of results to retrieve. */
|
|
79
|
+
pageToken?: string;
|
|
80
|
+
/** Either \'ASC\' or \'DESC\' to sort results ascending or descending respectively. */
|
|
81
|
+
orderBy?: "ASC" | "DESC";
|
|
82
|
+
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
83
|
+
limit?: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Options to pass to page
|
|
87
|
+
*/
|
|
88
|
+
export interface ProfileListInstancePageOptions {
|
|
89
|
+
/** The maximum number of items to return per page, maximum of 1000. */
|
|
90
|
+
pageSize?: number;
|
|
91
|
+
/** The token for the page of results to retrieve. */
|
|
92
|
+
pageToken?: string;
|
|
93
|
+
/** Either \'ASC\' or \'DESC\' to sort results ascending or descending respectively. */
|
|
94
|
+
orderBy?: "ASC" | "DESC";
|
|
95
|
+
}
|
|
96
|
+
export interface ProfileContext {
|
|
97
|
+
/**
|
|
98
|
+
* Remove a ProfileInstance
|
|
99
|
+
*
|
|
100
|
+
* @param callback - Callback to handle processed record
|
|
101
|
+
*
|
|
102
|
+
* @returns Resolves to processed ProfileInstance
|
|
103
|
+
*/
|
|
104
|
+
remove(callback?: (error: Error | null, item?: ProfileInstance) => any): Promise<ProfileInstance>;
|
|
105
|
+
/**
|
|
106
|
+
* Remove a ProfileInstance and return HTTP info
|
|
107
|
+
*
|
|
108
|
+
* @param callback - Callback to handle processed record
|
|
109
|
+
*
|
|
110
|
+
* @returns Resolves to processed ProfileInstance with HTTP metadata
|
|
111
|
+
*/
|
|
112
|
+
removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<ProfileInstance>) => any): Promise<ApiResponse<ProfileInstance>>;
|
|
113
|
+
/**
|
|
114
|
+
* Patch a ProfileInstance
|
|
115
|
+
*
|
|
116
|
+
* @param params - Body for request
|
|
117
|
+
* @param headers - header params for request
|
|
118
|
+
* @param callback - Callback to handle processed record
|
|
119
|
+
*
|
|
120
|
+
* @returns Resolves to processed ProfileInstance
|
|
121
|
+
*/
|
|
122
|
+
patch(params: ProfilePatch, headers?: any, callback?: (error: Error | null, item?: ProfileInstance) => any): Promise<ProfileInstance>;
|
|
123
|
+
/**
|
|
124
|
+
* Patch a ProfileInstance and return HTTP info
|
|
125
|
+
*
|
|
126
|
+
* @param params - Body for request
|
|
127
|
+
* @param headers - header params for request
|
|
128
|
+
* @param callback - Callback to handle processed record
|
|
129
|
+
*
|
|
130
|
+
* @returns Resolves to processed ProfileInstance with HTTP metadata
|
|
131
|
+
*/
|
|
132
|
+
patchWithHttpInfo(params: ProfilePatch, headers?: any, callback?: (error: Error | null, item?: ApiResponse<ProfileInstance>) => any): Promise<ApiResponse<ProfileInstance>>;
|
|
133
|
+
/**
|
|
134
|
+
* Provide a user-friendly representation
|
|
135
|
+
*/
|
|
136
|
+
toJSON(): any;
|
|
137
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
138
|
+
}
|
|
139
|
+
export interface ProfileContextSolution {
|
|
140
|
+
storeId: string;
|
|
141
|
+
profileId: string;
|
|
142
|
+
}
|
|
143
|
+
export declare class ProfileContextImpl implements ProfileContext {
|
|
144
|
+
protected _version: V1;
|
|
145
|
+
protected _solution: ProfileContextSolution;
|
|
146
|
+
protected _uri: string;
|
|
147
|
+
constructor(_version: V1, storeId: string, profileId: string);
|
|
148
|
+
remove(callback?: (error: Error | null, item?: ProfileInstance) => any): Promise<ProfileInstance>;
|
|
149
|
+
removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<ProfileInstance>) => any): Promise<ApiResponse<ProfileInstance>>;
|
|
150
|
+
patch(params: ProfilePatch, headers?: any, callback?: (error: Error | null, item?: ProfileInstance) => any): Promise<ProfileInstance>;
|
|
151
|
+
patchWithHttpInfo(params: ProfilePatch, headers?: any, callback?: (error: Error | null, item?: ApiResponse<ProfileInstance>) => any): Promise<ApiResponse<ProfileInstance>>;
|
|
152
|
+
/**
|
|
153
|
+
* Provide a user-friendly representation
|
|
154
|
+
*
|
|
155
|
+
* @returns Object
|
|
156
|
+
*/
|
|
157
|
+
toJSON(): ProfileContextSolution;
|
|
158
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Nested model for ProfileData
|
|
162
|
+
*/
|
|
163
|
+
export interface ProfileData {
|
|
164
|
+
traits?: {
|
|
165
|
+
[key: string]: {
|
|
166
|
+
[key: string]: any;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Nested model for ProfilePatch
|
|
172
|
+
*/
|
|
173
|
+
export interface ProfilePatch {
|
|
174
|
+
traits?: {
|
|
175
|
+
[key: string]: {
|
|
176
|
+
[key: string]: any;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Nested model for ProfilesMeta
|
|
182
|
+
*/
|
|
183
|
+
export interface ProfilesMeta {
|
|
184
|
+
key?: string;
|
|
185
|
+
pageSize?: number;
|
|
186
|
+
nextToken?: string;
|
|
187
|
+
previousToken?: string;
|
|
188
|
+
}
|
|
189
|
+
interface ProfilePayload extends TokenPaginationPayload {
|
|
190
|
+
profiles: string[];
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Response model for CreateProfile202Response operations
|
|
194
|
+
*/
|
|
195
|
+
interface CreateProfile202Response_ResponseResource {
|
|
196
|
+
id: string;
|
|
197
|
+
message: string;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Response model for DeleteProfile202Response operations
|
|
201
|
+
*/
|
|
202
|
+
interface DeleteProfile202Response_ResponseResource {
|
|
203
|
+
message: string;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Response model for PatchProfileTraits202Response operations
|
|
207
|
+
*/
|
|
208
|
+
interface PatchProfileTraits202Response_ResponseResource {
|
|
209
|
+
message: string;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Response model for ListProfiles200Response operations
|
|
213
|
+
*/
|
|
214
|
+
interface ListProfiles200Response_ResponseResource {
|
|
215
|
+
profiles?: Array<string>;
|
|
216
|
+
meta?: ProfilesMeta;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Union type for all possible response models
|
|
220
|
+
*/
|
|
221
|
+
type ProfileResource = CreateProfile202Response_ResponseResource | DeleteProfile202Response_ResponseResource | PatchProfileTraits202Response_ResponseResource | ListProfiles200Response_ResponseResource;
|
|
222
|
+
export declare class ProfileInstance {
|
|
223
|
+
protected _version: V1;
|
|
224
|
+
protected _solution: ProfileContextSolution;
|
|
225
|
+
protected _context?: ProfileContext;
|
|
226
|
+
constructor(_version: V1, _payload: ProfileResource, storeId: string, profileId?: string);
|
|
227
|
+
/**
|
|
228
|
+
* The canonical profile ID.
|
|
229
|
+
*/
|
|
230
|
+
id?: string;
|
|
231
|
+
message?: string;
|
|
232
|
+
profiles?: Array<string>;
|
|
233
|
+
meta?: ProfilesMeta;
|
|
234
|
+
private get _proxy();
|
|
235
|
+
/**
|
|
236
|
+
* Remove a ProfileInstance
|
|
237
|
+
*
|
|
238
|
+
* @param callback - Callback to handle processed record
|
|
239
|
+
*
|
|
240
|
+
* @returns Resolves to processed ProfileInstance
|
|
241
|
+
*/
|
|
242
|
+
remove(callback?: (error: Error | null, item?: ProfileInstance) => any): Promise<ProfileInstance>;
|
|
243
|
+
/**
|
|
244
|
+
* Remove a ProfileInstance and return HTTP info
|
|
245
|
+
*
|
|
246
|
+
* @param callback - Callback to handle processed record
|
|
247
|
+
*
|
|
248
|
+
* @returns Resolves to processed ProfileInstance with HTTP metadata
|
|
249
|
+
*/
|
|
250
|
+
removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<ProfileInstance>) => any): Promise<ApiResponse<ProfileInstance>>;
|
|
251
|
+
/**
|
|
252
|
+
* Patch a ProfileInstance
|
|
253
|
+
*
|
|
254
|
+
* @param params - Body for request
|
|
255
|
+
* @param headers - header params for request
|
|
256
|
+
* @param callback - Callback to handle processed record
|
|
257
|
+
*
|
|
258
|
+
* @returns Resolves to processed ProfileInstance
|
|
259
|
+
*/
|
|
260
|
+
patch(params: ProfilePatch, headers?: any, callback?: (error: Error | null, item?: ProfileInstance) => any): Promise<ProfileInstance>;
|
|
261
|
+
/**
|
|
262
|
+
* Patch a ProfileInstance and return HTTP info
|
|
263
|
+
*
|
|
264
|
+
* @param params - Body for request
|
|
265
|
+
* @param headers - header params for request
|
|
266
|
+
* @param callback - Callback to handle processed record
|
|
267
|
+
*
|
|
268
|
+
* @returns Resolves to processed ProfileInstance with HTTP metadata
|
|
269
|
+
*/
|
|
270
|
+
patchWithHttpInfo(params: ProfilePatch, headers?: any, callback?: (error: Error | null, item?: ApiResponse<ProfileInstance>) => any): Promise<ApiResponse<ProfileInstance>>;
|
|
271
|
+
/**
|
|
272
|
+
* Provide a user-friendly representation
|
|
273
|
+
*
|
|
274
|
+
* @returns Object
|
|
275
|
+
*/
|
|
276
|
+
toJSON(): {
|
|
277
|
+
id: string;
|
|
278
|
+
message: string;
|
|
279
|
+
profiles: string[];
|
|
280
|
+
meta: ProfilesMeta;
|
|
281
|
+
};
|
|
282
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
283
|
+
}
|
|
284
|
+
export interface ProfileSolution {
|
|
285
|
+
storeId: string;
|
|
286
|
+
}
|
|
287
|
+
export interface ProfileListInstance {
|
|
288
|
+
_version: V1;
|
|
289
|
+
_solution: ProfileSolution;
|
|
290
|
+
_uri: string;
|
|
291
|
+
(profileId: string): ProfileContext;
|
|
292
|
+
get(profileId: string): ProfileContext;
|
|
293
|
+
/**
|
|
294
|
+
* Create a ProfileInstance
|
|
295
|
+
*
|
|
296
|
+
* @param params - Body for request
|
|
297
|
+
* @param headers - header params for request
|
|
298
|
+
* @param callback - Callback to handle processed record
|
|
299
|
+
*
|
|
300
|
+
* @returns Resolves to processed ProfileInstance
|
|
301
|
+
*/
|
|
302
|
+
create(params: ProfileData, headers?: any, callback?: (error: Error | null, item?: ProfileInstance) => any): Promise<ProfileInstance>;
|
|
303
|
+
/**
|
|
304
|
+
* Create a ProfileInstance and return HTTP info
|
|
305
|
+
*
|
|
306
|
+
* @param params - Body for request
|
|
307
|
+
* @param headers - header params for request
|
|
308
|
+
* @param callback - Callback to handle processed record
|
|
309
|
+
*
|
|
310
|
+
* @returns Resolves to processed ProfileInstance with HTTP metadata
|
|
311
|
+
*/
|
|
312
|
+
createWithHttpInfo(params: ProfileData, headers?: any, callback?: (error: Error | null, item?: ApiResponse<ProfileInstance>) => any): Promise<ApiResponse<ProfileInstance>>;
|
|
313
|
+
/**
|
|
314
|
+
* Streams ProfileInstance records from the API.
|
|
315
|
+
*
|
|
316
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
317
|
+
* is reached.
|
|
318
|
+
*
|
|
319
|
+
* The results are passed into the callback function, so this operation is memory
|
|
320
|
+
* efficient.
|
|
321
|
+
*
|
|
322
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
323
|
+
* function.
|
|
324
|
+
*
|
|
325
|
+
* @param { ProfileListInstanceEachOptions } [params] - Options for request
|
|
326
|
+
* @param { function } [callback] - Function to process each record
|
|
327
|
+
*/
|
|
328
|
+
each(callback?: (item: string, done: (err?: Error) => void) => void): void;
|
|
329
|
+
each(params: ProfileListInstanceEachOptions, callback?: (item: string, done: (err?: Error) => void) => void): void;
|
|
330
|
+
/**
|
|
331
|
+
* Streams ProfileInstance records from the API with HTTP metadata captured per page.
|
|
332
|
+
*
|
|
333
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
334
|
+
* is reached. HTTP metadata (status code, headers) is captured for each page request.
|
|
335
|
+
*
|
|
336
|
+
* The results are passed into the callback function, so this operation is memory
|
|
337
|
+
* efficient.
|
|
338
|
+
*
|
|
339
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
340
|
+
* function.
|
|
341
|
+
*
|
|
342
|
+
* @param { ProfileListInstanceEachOptions } [params] - Options for request
|
|
343
|
+
* @param { function } [callback] - Function to process each record
|
|
344
|
+
*/
|
|
345
|
+
eachWithHttpInfo(callback?: (item: string, done: (err?: Error) => void) => void): void;
|
|
346
|
+
eachWithHttpInfo(params: ProfileListInstanceEachOptions, callback?: (item: string, done: (err?: Error) => void) => void): void;
|
|
347
|
+
/**
|
|
348
|
+
* Retrieve a single target page of ProfileInstance records from the API.
|
|
349
|
+
*
|
|
350
|
+
* The request is executed immediately.
|
|
351
|
+
*
|
|
352
|
+
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
353
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
354
|
+
*/
|
|
355
|
+
getPage(targetUrl: string, callback?: (error: Error | null, items: ProfilePage) => any): Promise<ProfilePage>;
|
|
356
|
+
/**
|
|
357
|
+
* Retrieve a single target page of ProfileInstance records from the API with HTTP metadata.
|
|
358
|
+
*
|
|
359
|
+
* The request is executed immediately.
|
|
360
|
+
*
|
|
361
|
+
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
362
|
+
* @param { function } [callback] - Callback to handle list of records with metadata
|
|
363
|
+
*/
|
|
364
|
+
getPageWithHttpInfo(targetUrl: string, callback?: (error: Error | null, items: ApiResponse<ProfilePage>) => any): Promise<ApiResponse<ProfilePage>>;
|
|
365
|
+
/**
|
|
366
|
+
* Lists ProfileInstance records from the API as a list.
|
|
367
|
+
*
|
|
368
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
369
|
+
* function.
|
|
370
|
+
*
|
|
371
|
+
* @param { ProfileListInstanceOptions } [params] - Options for request
|
|
372
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
373
|
+
*/
|
|
374
|
+
list(callback?: (error: Error | null, items: string[]) => any): Promise<string[]>;
|
|
375
|
+
list(params: ProfileListInstanceOptions, callback?: (error: Error | null, items: string[]) => any): Promise<string[]>;
|
|
376
|
+
/**
|
|
377
|
+
* Lists ProfileInstance records from the API as a list with HTTP metadata.
|
|
378
|
+
*
|
|
379
|
+
* Returns all records along with HTTP metadata from the first page fetched.
|
|
380
|
+
*
|
|
381
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
382
|
+
* function.
|
|
383
|
+
*
|
|
384
|
+
* @param { ProfileListInstanceOptions } [params] - Options for request
|
|
385
|
+
* @param { function } [callback] - Callback to handle list of records with metadata
|
|
386
|
+
*/
|
|
387
|
+
listWithHttpInfo(callback?: (error: Error | null, items: ApiResponse<string[]>) => any): Promise<ApiResponse<string[]>>;
|
|
388
|
+
listWithHttpInfo(params: ProfileListInstanceOptions, callback?: (error: Error | null, items: ApiResponse<string[]>) => any): Promise<ApiResponse<string[]>>;
|
|
389
|
+
/**
|
|
390
|
+
* Retrieve a single page of ProfileInstance records from the API.
|
|
391
|
+
*
|
|
392
|
+
* The request is executed immediately.
|
|
393
|
+
*
|
|
394
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
395
|
+
* function.
|
|
396
|
+
*
|
|
397
|
+
* @param { ProfileListInstancePageOptions } [params] - Options for request
|
|
398
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
399
|
+
*/
|
|
400
|
+
page(callback?: (error: Error | null, items: ProfilePage) => any): Promise<ProfilePage>;
|
|
401
|
+
page(params: ProfileListInstancePageOptions, callback?: (error: Error | null, items: ProfilePage) => any): Promise<ProfilePage>;
|
|
402
|
+
/**
|
|
403
|
+
* Retrieve a single page of ProfileInstance records from the API with HTTP metadata.
|
|
404
|
+
*
|
|
405
|
+
* The request is executed immediately.
|
|
406
|
+
*
|
|
407
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
408
|
+
* function.
|
|
409
|
+
*
|
|
410
|
+
* @param { ProfileListInstancePageOptions } [params] - Options for request
|
|
411
|
+
* @param { function } [callback] - Callback to handle list of records with metadata
|
|
412
|
+
*/
|
|
413
|
+
pageWithHttpInfo(callback?: (error: Error | null, items: ApiResponse<ProfilePage>) => any): Promise<ApiResponse<ProfilePage>>;
|
|
414
|
+
pageWithHttpInfo(params: ProfileListInstancePageOptions, callback?: (error: Error | null, items: ApiResponse<ProfilePage>) => any): Promise<ApiResponse<ProfilePage>>;
|
|
415
|
+
/**
|
|
416
|
+
* Provide a user-friendly representation
|
|
417
|
+
*/
|
|
418
|
+
toJSON(): any;
|
|
419
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
420
|
+
}
|
|
421
|
+
export declare function ProfileListInstance(version: V1, storeId: string): ProfileListInstance;
|
|
422
|
+
export declare class ProfilePage extends TokenPage<V1, ProfilePayload, ProfileResource, string> {
|
|
423
|
+
/**
|
|
424
|
+
* Initialize the ProfilePage
|
|
425
|
+
*
|
|
426
|
+
* @param version - Version of the resource
|
|
427
|
+
* @param response - Response from the API
|
|
428
|
+
* @param uri - URI of the resource
|
|
429
|
+
* @param params - Query parameters
|
|
430
|
+
* @param solution - Path solution
|
|
431
|
+
*/
|
|
432
|
+
constructor(version: V1, response: Response<string>, uri: string, params: any, solution: ProfileSolution);
|
|
433
|
+
/**
|
|
434
|
+
* Build an instance of ProfileInstance
|
|
435
|
+
*
|
|
436
|
+
* @param payload - Payload response from the API
|
|
437
|
+
*/
|
|
438
|
+
getInstance(payload: ProfileResource): string;
|
|
439
|
+
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
440
|
+
}
|
|
441
|
+
export {};
|