@fonoster/sdk 0.6.5 → 0.7.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 +524 -459
- package/dist/node/Acls.d.ts +43 -44
- package/dist/node/Acls.js +62 -49
- package/dist/node/Agents.d.ts +44 -45
- package/dist/node/Agents.js +47 -46
- package/dist/node/ApiKeys.d.ts +29 -29
- package/dist/node/ApiKeys.js +29 -29
- package/dist/node/Applications.d.ts +43 -43
- package/dist/node/Applications.js +56 -44
- package/dist/node/Calls.d.ts +42 -30
- package/dist/node/Calls.js +78 -54
- package/dist/node/Credentials.d.ts +39 -39
- package/dist/node/Credentials.js +39 -39
- package/dist/node/Domains.d.ts +37 -37
- package/dist/node/Domains.js +37 -37
- package/dist/node/Numbers.d.ts +40 -40
- package/dist/node/Numbers.js +40 -40
- package/dist/node/Secrets.d.ts +37 -37
- package/dist/node/Secrets.js +37 -37
- package/dist/node/Trunks.d.ts +58 -52
- package/dist/node/Trunks.js +104 -70
- package/dist/node/Users.d.ts +34 -34
- package/dist/node/Users.js +34 -34
- package/dist/node/Workspaces.d.ts +55 -54
- package/dist/node/Workspaces.js +61 -54
- package/dist/node/client/jsonToObject.js +1 -1
- package/dist/node/client/makeRpcRequest.js +1 -1
- package/dist/node/client/objectToJson.d.ts +1 -1
- package/dist/node/client/objectToJson.js +12 -2
- package/dist/node/client/types/CallsClient.d.ts +3 -2
- package/dist/node/client/types/IdentityClient.d.ts +2 -2
- package/dist/node/client/types/common.d.ts +8 -1
- package/dist/node/client/utils.js +6 -3
- package/dist/node/generated/node/acls_pb.js +6 -6
- package/dist/node/generated/node/agents_grpc_pb.js +0 -2
- package/dist/node/generated/node/agents_pb.js +450 -30
- package/dist/node/generated/node/applications_pb.js +24 -24
- package/dist/node/generated/node/calls_grpc_pb.js +0 -3
- package/dist/node/generated/node/calls_pb.js +103 -104
- package/dist/node/generated/node/credentials_pb.js +15 -45
- package/dist/node/generated/node/domains_pb.js +34 -34
- package/dist/node/generated/node/identity_grpc_pb.js +14 -14
- package/dist/node/generated/node/identity_pb.js +55 -55
- package/dist/node/generated/node/numbers_grpc_pb.js +0 -1
- package/dist/node/generated/node/numbers_pb.js +197 -17
- package/dist/node/generated/node/secrets_pb.js +6 -6
- package/dist/node/generated/node/trunks_grpc_pb.js +0 -2
- package/dist/node/generated/node/trunks_pb.js +532 -37
- package/dist/node/generated/web/IdentityServiceClientPb.ts +5 -5
- package/dist/node/generated/web/acls_pb.js +6 -6
- package/dist/node/generated/web/agents_pb.d.ts +62 -10
- package/dist/node/generated/web/agents_pb.js +450 -30
- package/dist/node/generated/web/applications_pb.d.ts +9 -9
- package/dist/node/generated/web/applications_pb.js +24 -24
- package/dist/node/generated/web/calls_pb.d.ts +37 -37
- package/dist/node/generated/web/calls_pb.js +103 -104
- package/dist/node/generated/web/credentials_pb.d.ts +0 -4
- package/dist/node/generated/web/credentials_pb.js +15 -45
- package/dist/node/generated/web/domains_pb.js +34 -34
- package/dist/node/generated/web/identity_pb.d.ts +13 -13
- package/dist/node/generated/web/identity_pb.js +55 -55
- package/dist/node/generated/web/numbers_pb.d.ts +26 -4
- package/dist/node/generated/web/numbers_pb.js +197 -17
- package/dist/node/generated/web/secrets_pb.js +6 -6
- package/dist/node/generated/web/trunks_pb.d.ts +71 -11
- package/dist/node/generated/web/trunks_pb.js +532 -37
- package/dist/node/tsconfig.node.tsbuildinfo +1 -1
- package/dist/node/utils.d.ts +5 -3
- package/dist/node/utils.js +56 -0
- package/dist/web/fonoster.min.js +1 -1
- package/dist/web/index.esm.js +1 -1
- package/package.json +4 -4
|
@@ -527,7 +527,7 @@ proto.fonoster.applications.v1beta2.Application.toObject = function(includeInsta
|
|
|
527
527
|
ref: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
528
528
|
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
529
529
|
type: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
530
|
-
|
|
530
|
+
endpoint: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
531
531
|
textToSpeech: (f = msg.getTextToSpeech()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
|
|
532
532
|
speechToText: (f = msg.getSpeechToText()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
|
|
533
533
|
conversation: (f = msg.getConversation()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
|
|
@@ -583,7 +583,7 @@ proto.fonoster.applications.v1beta2.Application.deserializeBinaryFromReader = fu
|
|
|
583
583
|
break;
|
|
584
584
|
case 4:
|
|
585
585
|
var value = /** @type {string} */ (reader.readString());
|
|
586
|
-
msg.
|
|
586
|
+
msg.setEndpoint(value);
|
|
587
587
|
break;
|
|
588
588
|
case 5:
|
|
589
589
|
var value = new proto.fonoster.applications.v1beta2.ProductContainer;
|
|
@@ -601,11 +601,11 @@ proto.fonoster.applications.v1beta2.Application.deserializeBinaryFromReader = fu
|
|
|
601
601
|
msg.setConversation(value);
|
|
602
602
|
break;
|
|
603
603
|
case 8:
|
|
604
|
-
var value = /** @type {number} */ (reader.
|
|
604
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
605
605
|
msg.setCreatedAt(value);
|
|
606
606
|
break;
|
|
607
607
|
case 9:
|
|
608
|
-
var value = /** @type {number} */ (reader.
|
|
608
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
609
609
|
msg.setUpdatedAt(value);
|
|
610
610
|
break;
|
|
611
611
|
default:
|
|
@@ -658,7 +658,7 @@ proto.fonoster.applications.v1beta2.Application.serializeBinaryToWriter = functi
|
|
|
658
658
|
f
|
|
659
659
|
);
|
|
660
660
|
}
|
|
661
|
-
f = message.
|
|
661
|
+
f = message.getEndpoint();
|
|
662
662
|
if (f.length > 0) {
|
|
663
663
|
writer.writeString(
|
|
664
664
|
4,
|
|
@@ -691,14 +691,14 @@ proto.fonoster.applications.v1beta2.Application.serializeBinaryToWriter = functi
|
|
|
691
691
|
}
|
|
692
692
|
f = message.getCreatedAt();
|
|
693
693
|
if (f !== 0) {
|
|
694
|
-
writer.
|
|
694
|
+
writer.writeInt32(
|
|
695
695
|
8,
|
|
696
696
|
f
|
|
697
697
|
);
|
|
698
698
|
}
|
|
699
699
|
f = message.getUpdatedAt();
|
|
700
700
|
if (f !== 0) {
|
|
701
|
-
writer.
|
|
701
|
+
writer.writeInt32(
|
|
702
702
|
9,
|
|
703
703
|
f
|
|
704
704
|
);
|
|
@@ -761,10 +761,10 @@ proto.fonoster.applications.v1beta2.Application.prototype.setType = function(val
|
|
|
761
761
|
|
|
762
762
|
|
|
763
763
|
/**
|
|
764
|
-
* optional string
|
|
764
|
+
* optional string endpoint = 4;
|
|
765
765
|
* @return {string}
|
|
766
766
|
*/
|
|
767
|
-
proto.fonoster.applications.v1beta2.Application.prototype.
|
|
767
|
+
proto.fonoster.applications.v1beta2.Application.prototype.getEndpoint = function() {
|
|
768
768
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
769
769
|
};
|
|
770
770
|
|
|
@@ -773,7 +773,7 @@ proto.fonoster.applications.v1beta2.Application.prototype.getAppEndpoint = funct
|
|
|
773
773
|
* @param {string} value
|
|
774
774
|
* @return {!proto.fonoster.applications.v1beta2.Application} returns this
|
|
775
775
|
*/
|
|
776
|
-
proto.fonoster.applications.v1beta2.Application.prototype.
|
|
776
|
+
proto.fonoster.applications.v1beta2.Application.prototype.setEndpoint = function(value) {
|
|
777
777
|
return jspb.Message.setProto3StringField(this, 4, value);
|
|
778
778
|
};
|
|
779
779
|
|
|
@@ -890,7 +890,7 @@ proto.fonoster.applications.v1beta2.Application.prototype.hasConversation = func
|
|
|
890
890
|
|
|
891
891
|
|
|
892
892
|
/**
|
|
893
|
-
* optional
|
|
893
|
+
* optional int32 created_at = 8;
|
|
894
894
|
* @return {number}
|
|
895
895
|
*/
|
|
896
896
|
proto.fonoster.applications.v1beta2.Application.prototype.getCreatedAt = function() {
|
|
@@ -908,7 +908,7 @@ proto.fonoster.applications.v1beta2.Application.prototype.setCreatedAt = functio
|
|
|
908
908
|
|
|
909
909
|
|
|
910
910
|
/**
|
|
911
|
-
* optional
|
|
911
|
+
* optional int32 updated_at = 9;
|
|
912
912
|
* @return {number}
|
|
913
913
|
*/
|
|
914
914
|
proto.fonoster.applications.v1beta2.Application.prototype.getUpdatedAt = function() {
|
|
@@ -959,7 +959,7 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.toObject = function
|
|
|
959
959
|
var f, obj = {
|
|
960
960
|
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
961
961
|
type: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
962
|
-
|
|
962
|
+
endpoint: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
963
963
|
textToSpeech: (f = msg.getTextToSpeech()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
|
|
964
964
|
speechToText: (f = msg.getSpeechToText()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
|
|
965
965
|
intelligence: (f = msg.getIntelligence()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f)
|
|
@@ -1009,7 +1009,7 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.deserializeBinaryFr
|
|
|
1009
1009
|
break;
|
|
1010
1010
|
case 3:
|
|
1011
1011
|
var value = /** @type {string} */ (reader.readString());
|
|
1012
|
-
msg.
|
|
1012
|
+
msg.setEndpoint(value);
|
|
1013
1013
|
break;
|
|
1014
1014
|
case 4:
|
|
1015
1015
|
var value = new proto.fonoster.applications.v1beta2.ProductContainer;
|
|
@@ -1069,7 +1069,7 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.serializeBinaryToWr
|
|
|
1069
1069
|
f
|
|
1070
1070
|
);
|
|
1071
1071
|
}
|
|
1072
|
-
f = message.
|
|
1072
|
+
f = message.getEndpoint();
|
|
1073
1073
|
if (f.length > 0) {
|
|
1074
1074
|
writer.writeString(
|
|
1075
1075
|
3,
|
|
@@ -1140,10 +1140,10 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.setType =
|
|
|
1140
1140
|
|
|
1141
1141
|
|
|
1142
1142
|
/**
|
|
1143
|
-
* optional string
|
|
1143
|
+
* optional string endpoint = 3;
|
|
1144
1144
|
* @return {string}
|
|
1145
1145
|
*/
|
|
1146
|
-
proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.
|
|
1146
|
+
proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.getEndpoint = function() {
|
|
1147
1147
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
1148
1148
|
};
|
|
1149
1149
|
|
|
@@ -1152,7 +1152,7 @@ proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.getAppEnd
|
|
|
1152
1152
|
* @param {string} value
|
|
1153
1153
|
* @return {!proto.fonoster.applications.v1beta2.CreateApplicationRequest} returns this
|
|
1154
1154
|
*/
|
|
1155
|
-
proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.
|
|
1155
|
+
proto.fonoster.applications.v1beta2.CreateApplicationRequest.prototype.setEndpoint = function(value) {
|
|
1156
1156
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
1157
1157
|
};
|
|
1158
1158
|
|
|
@@ -1913,7 +1913,7 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.toObject = function
|
|
|
1913
1913
|
ref: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
1914
1914
|
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
1915
1915
|
type: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
1916
|
-
|
|
1916
|
+
endpoint: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
1917
1917
|
textToSpeech: (f = msg.getTextToSpeech()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
|
|
1918
1918
|
speechToText: (f = msg.getSpeechToText()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f),
|
|
1919
1919
|
intelligence: (f = msg.getIntelligence()) && proto.fonoster.applications.v1beta2.ProductContainer.toObject(includeInstance, f)
|
|
@@ -1967,7 +1967,7 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.deserializeBinaryFr
|
|
|
1967
1967
|
break;
|
|
1968
1968
|
case 4:
|
|
1969
1969
|
var value = /** @type {string} */ (reader.readString());
|
|
1970
|
-
msg.
|
|
1970
|
+
msg.setEndpoint(value);
|
|
1971
1971
|
break;
|
|
1972
1972
|
case 5:
|
|
1973
1973
|
var value = new proto.fonoster.applications.v1beta2.ProductContainer;
|
|
@@ -2034,7 +2034,7 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.serializeBinaryToWr
|
|
|
2034
2034
|
f
|
|
2035
2035
|
);
|
|
2036
2036
|
}
|
|
2037
|
-
f = message.
|
|
2037
|
+
f = message.getEndpoint();
|
|
2038
2038
|
if (f.length > 0) {
|
|
2039
2039
|
writer.writeString(
|
|
2040
2040
|
4,
|
|
@@ -2123,10 +2123,10 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.setType =
|
|
|
2123
2123
|
|
|
2124
2124
|
|
|
2125
2125
|
/**
|
|
2126
|
-
* optional string
|
|
2126
|
+
* optional string endpoint = 4;
|
|
2127
2127
|
* @return {string}
|
|
2128
2128
|
*/
|
|
2129
|
-
proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.
|
|
2129
|
+
proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.getEndpoint = function() {
|
|
2130
2130
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
2131
2131
|
};
|
|
2132
2132
|
|
|
@@ -2135,7 +2135,7 @@ proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.getAppEnd
|
|
|
2135
2135
|
* @param {string} value
|
|
2136
2136
|
* @return {!proto.fonoster.applications.v1beta2.UpdateApplicationRequest} returns this
|
|
2137
2137
|
*/
|
|
2138
|
-
proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.
|
|
2138
|
+
proto.fonoster.applications.v1beta2.UpdateApplicationRequest.prototype.setEndpoint = function(value) {
|
|
2139
2139
|
return jspb.Message.setProto3StringField(this, 4, value);
|
|
2140
2140
|
};
|
|
2141
2141
|
|
|
@@ -6,15 +6,15 @@ export class CallDetailRecord extends jspb.Message {
|
|
|
6
6
|
getRef(): string;
|
|
7
7
|
setRef(value: string): CallDetailRecord;
|
|
8
8
|
|
|
9
|
+
getCallId(): string;
|
|
10
|
+
setCallId(value: string): CallDetailRecord;
|
|
11
|
+
|
|
9
12
|
getType(): CallType;
|
|
10
13
|
setType(value: CallType): CallDetailRecord;
|
|
11
14
|
|
|
12
15
|
getStatus(): CallStatus;
|
|
13
16
|
setStatus(value: CallStatus): CallDetailRecord;
|
|
14
17
|
|
|
15
|
-
getHangupCause(): HangupCause;
|
|
16
|
-
setHangupCause(value: HangupCause): CallDetailRecord;
|
|
17
|
-
|
|
18
18
|
getStartedAt(): number;
|
|
19
19
|
setStartedAt(value: number): CallDetailRecord;
|
|
20
20
|
|
|
@@ -44,9 +44,9 @@ export class CallDetailRecord extends jspb.Message {
|
|
|
44
44
|
export namespace CallDetailRecord {
|
|
45
45
|
export type AsObject = {
|
|
46
46
|
ref: string,
|
|
47
|
+
callId: string,
|
|
47
48
|
type: CallType,
|
|
48
49
|
status: CallStatus,
|
|
49
|
-
hangupCause: HangupCause,
|
|
50
50
|
startedAt: number,
|
|
51
51
|
endedAt: number,
|
|
52
52
|
from: string,
|
|
@@ -66,6 +66,9 @@ export class CreateCallRequest extends jspb.Message {
|
|
|
66
66
|
getAppRef(): string;
|
|
67
67
|
setAppRef(value: string): CreateCallRequest;
|
|
68
68
|
|
|
69
|
+
getTimeout(): number;
|
|
70
|
+
setTimeout(value: number): CreateCallRequest;
|
|
71
|
+
|
|
69
72
|
serializeBinary(): Uint8Array;
|
|
70
73
|
toObject(includeInstance?: boolean): CreateCallRequest.AsObject;
|
|
71
74
|
static toObject(includeInstance: boolean, msg: CreateCallRequest): CreateCallRequest.AsObject;
|
|
@@ -79,6 +82,7 @@ export namespace CreateCallRequest {
|
|
|
79
82
|
from: string,
|
|
80
83
|
to: string,
|
|
81
84
|
appRef: string,
|
|
85
|
+
timeout: number,
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
|
|
@@ -207,11 +211,8 @@ export namespace TrackCallRequest {
|
|
|
207
211
|
}
|
|
208
212
|
|
|
209
213
|
export class TrackCallResponse extends jspb.Message {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
getStatus(): CallStatus;
|
|
214
|
-
setStatus(value: CallStatus): TrackCallResponse;
|
|
214
|
+
getStatus(): TrackCallResponse.Status;
|
|
215
|
+
setStatus(value: TrackCallResponse.Status): TrackCallResponse;
|
|
215
216
|
|
|
216
217
|
serializeBinary(): Uint8Array;
|
|
217
218
|
toObject(includeInstance?: boolean): TrackCallResponse.AsObject;
|
|
@@ -223,40 +224,39 @@ export class TrackCallResponse extends jspb.Message {
|
|
|
223
224
|
|
|
224
225
|
export namespace TrackCallResponse {
|
|
225
226
|
export type AsObject = {
|
|
226
|
-
|
|
227
|
-
|
|
227
|
+
status: TrackCallResponse.Status,
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export enum Status {
|
|
231
|
+
TRYING = 0,
|
|
232
|
+
CANCEL = 1,
|
|
233
|
+
ANSWER = 2,
|
|
234
|
+
BUSY = 3,
|
|
235
|
+
PROGRESS = 4,
|
|
236
|
+
NOANSWER = 5,
|
|
237
|
+
FAILED = 6,
|
|
228
238
|
}
|
|
229
239
|
}
|
|
230
240
|
|
|
231
241
|
export enum CallType {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
export enum HangupCause {
|
|
236
|
-
NORMAL_CLEARING = 0,
|
|
237
|
-
CALL_REJECTED = 1,
|
|
238
|
-
UNALLOCATED = 2,
|
|
239
|
-
NO_USER_RESPONSE = 3,
|
|
240
|
-
NO_ROUTE_DESTINATION = 4,
|
|
241
|
-
NO_ANSWER = 5,
|
|
242
|
-
USER_BUSY = 6,
|
|
243
|
-
NOT_ACCEPTABLE_HERE = 7,
|
|
244
|
-
SERVICE_UNAVAILABLE = 8,
|
|
245
|
-
INVALID_NUMBER_FORMAT = 9,
|
|
246
|
-
UNKNOWN = 10,
|
|
242
|
+
SIP_ORIGINATED = 0,
|
|
243
|
+
API_ORIGINATED = 1,
|
|
247
244
|
}
|
|
248
245
|
export enum CallStatus {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
246
|
+
UNKNOWN = 0,
|
|
247
|
+
NORMAL_CLEARING = 1,
|
|
248
|
+
CALL_REJECTED = 2,
|
|
249
|
+
UNALLOCATED = 3,
|
|
250
|
+
NO_USER_RESPONSE = 4,
|
|
251
|
+
NO_ROUTE_DESTINATION = 5,
|
|
252
|
+
NO_ANSWER = 6,
|
|
253
|
+
USER_BUSY = 7,
|
|
254
|
+
NOT_ACCEPTABLE_HERE = 8,
|
|
255
|
+
SERVICE_UNAVAILABLE = 9,
|
|
256
|
+
INVALID_NUMBER_FORMAT = 10,
|
|
258
257
|
}
|
|
259
258
|
export enum CallDirection {
|
|
260
|
-
|
|
261
|
-
|
|
259
|
+
FROM_PSTN = 0,
|
|
260
|
+
TO_PSTN = 1,
|
|
261
|
+
INTRA_NETWORK = 2,
|
|
262
262
|
}
|