twilio 5.5.0 → 5.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/lib/rest/Knowledge.d.ts +4 -0
  2. package/lib/rest/Knowledge.js +8 -0
  3. package/lib/rest/KnowledgeBase.d.ts +13 -0
  4. package/lib/rest/KnowledgeBase.js +31 -0
  5. package/lib/rest/PreviewBase.d.ts +0 -3
  6. package/lib/rest/PreviewBase.js +0 -5
  7. package/lib/rest/Twilio.d.ts +5 -0
  8. package/lib/rest/Twilio.js +5 -0
  9. package/lib/rest/accounts/v1/safelist.d.ts +4 -4
  10. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +3 -0
  11. package/lib/rest/api/v2010/account/call/recording.d.ts +6 -0
  12. package/lib/rest/api/v2010/account/call/siprec.d.ts +3 -0
  13. package/lib/rest/api/v2010/account/call/stream.d.ts +3 -0
  14. package/lib/rest/api/v2010/account/call/transcription.d.ts +3 -0
  15. package/lib/rest/api/v2010/account/call.d.ts +3 -0
  16. package/lib/rest/api/v2010/account/conference/participant.d.ts +4 -1
  17. package/lib/rest/api/v2010/account/conference/recording.d.ts +6 -0
  18. package/lib/rest/api/v2010/account/conference.d.ts +7 -1
  19. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +6 -0
  20. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +6 -0
  21. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +6 -0
  22. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +6 -0
  23. package/lib/rest/api/v2010/account/message/feedback.d.ts +3 -0
  24. package/lib/rest/api/v2010/account/message.d.ts +9 -0
  25. package/lib/rest/api/v2010/account/message.js +2 -0
  26. package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +3 -0
  27. package/lib/rest/api/v2010/account/recording/transcription.d.ts +3 -0
  28. package/lib/rest/api/v2010/account/recording.d.ts +6 -0
  29. package/lib/rest/api/v2010/account/transcription.d.ts +3 -0
  30. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +3 -0
  31. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +3 -0
  32. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +3 -0
  33. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +3 -0
  34. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +3 -0
  35. package/lib/rest/api/v2010/account/usage/record/today.d.ts +3 -0
  36. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +3 -0
  37. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +3 -0
  38. package/lib/rest/api/v2010/account/usage/record.d.ts +3 -0
  39. package/lib/rest/api/v2010/account/usage/trigger.d.ts +6 -0
  40. package/lib/rest/api/v2010/account/usage.d.ts +3 -0
  41. package/lib/rest/api/v2010/account.d.ts +6 -0
  42. package/lib/rest/chat/v2/service/binding.d.ts +3 -0
  43. package/lib/rest/chat/v2/service/channel/webhook.d.ts +3 -0
  44. package/lib/rest/chat/v2/service/user/userBinding.d.ts +3 -0
  45. package/lib/rest/chat/v2/service/user/userChannel.d.ts +3 -0
  46. package/lib/rest/conversations/v1/addressConfiguration.d.ts +3 -0
  47. package/lib/rest/conversations/v1/configuration/webhook.d.ts +6 -0
  48. package/lib/rest/conversations/v1/conversation/webhook.d.ts +3 -0
  49. package/lib/rest/conversations/v1/conversation.d.ts +3 -0
  50. package/lib/rest/conversations/v1/conversationWithParticipants.d.ts +3 -0
  51. package/lib/rest/conversations/v1/service/binding.d.ts +3 -0
  52. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +3 -0
  53. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +3 -0
  54. package/lib/rest/conversations/v1/service/conversation.d.ts +3 -0
  55. package/lib/rest/conversations/v1/service/conversationWithParticipants.d.ts +3 -0
  56. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +3 -0
  57. package/lib/rest/conversations/v1/user/userConversation.d.ts +3 -0
  58. package/lib/rest/events/v1/sink.d.ts +6 -0
  59. package/lib/rest/flexApi/v1/configuration.d.ts +3 -0
  60. package/lib/rest/flexApi/v1/flexFlow.d.ts +6 -0
  61. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +3 -0
  62. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +3 -0
  63. package/lib/rest/flexApi/v1/provisioningStatus.d.ts +3 -0
  64. package/lib/rest/flexApi/v2/flexUser.d.ts +0 -24
  65. package/lib/rest/flexApi/v2/flexUser.js +0 -12
  66. package/lib/rest/iam/V1.d.ts +5 -0
  67. package/lib/rest/iam/V1.js +6 -0
  68. package/lib/rest/iam/v1/token.d.ts +88 -0
  69. package/lib/rest/iam/v1/token.js +99 -0
  70. package/lib/rest/insights/v1/room/participant.d.ts +2 -2
  71. package/lib/rest/insights/v1/room.d.ts +2 -2
  72. package/lib/rest/intelligence/v2/customOperator.d.ts +3 -0
  73. package/lib/rest/intelligence/v2/operator.d.ts +3 -0
  74. package/lib/rest/intelligence/v2/operatorType.d.ts +9 -0
  75. package/lib/rest/intelligence/v2/prebuiltOperator.d.ts +3 -0
  76. package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +3 -0
  77. package/lib/rest/intelligence/v2/transcript.d.ts +3 -0
  78. package/lib/rest/knowledge/V1.d.ts +15 -0
  79. package/lib/rest/{preview/Sync.js → knowledge/V1.js} +11 -11
  80. package/lib/rest/knowledge/v1/knowledge/chunk.d.ts +167 -0
  81. package/lib/rest/knowledge/v1/knowledge/chunk.js +131 -0
  82. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.d.ts +101 -0
  83. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.js +118 -0
  84. package/lib/rest/knowledge/v1/knowledge.d.ts +406 -0
  85. package/lib/rest/{preview/sync/service/document.js → knowledge/v1/knowledge.js} +102 -91
  86. package/lib/rest/lookups/v1/phoneNumber.d.ts +1 -1
  87. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +3 -0
  88. package/lib/rest/messaging/v1/brandRegistration.d.ts +9 -0
  89. package/lib/rest/messaging/v1/service.d.ts +3 -0
  90. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +6 -0
  91. package/lib/rest/monitor/v1/event.d.ts +1 -1
  92. package/lib/rest/notify/v1/service/binding.d.ts +3 -0
  93. package/lib/rest/notify/v1/service/notification.d.ts +3 -0
  94. package/lib/rest/numbers/v1/portingPortability.d.ts +3 -0
  95. package/lib/rest/numbers/v1/portingWebhookConfigurationDelete.d.ts +3 -0
  96. package/lib/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.d.ts +3 -0
  97. package/lib/rest/numbers/v2/authorizationDocument.d.ts +3 -0
  98. package/lib/rest/numbers/v2/bulkHostedNumberOrder.d.ts +3 -0
  99. package/lib/rest/numbers/v2/bundleClone.d.ts +3 -0
  100. package/lib/rest/numbers/v2/hostedNumberOrder.d.ts +6 -0
  101. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +3 -0
  102. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +3 -0
  103. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +3 -0
  104. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +3 -0
  105. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +3 -0
  106. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +3 -0
  107. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +3 -0
  108. package/lib/rest/numbers/v2/regulatoryCompliance.d.ts +3 -0
  109. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +6 -0
  110. package/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +3 -0
  111. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +6 -0
  112. package/lib/rest/proxy/v1/service/session/interaction.d.ts +3 -0
  113. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +3 -0
  114. package/lib/rest/proxy/v1/service/session.d.ts +6 -0
  115. package/lib/rest/proxy/v1/service.d.ts +6 -0
  116. package/lib/rest/serverless/v1/service/asset/assetVersion.d.ts +3 -0
  117. package/lib/rest/serverless/v1/service/build/buildStatus.d.ts +3 -0
  118. package/lib/rest/serverless/v1/service/build.d.ts +6 -0
  119. package/lib/rest/serverless/v1/service/environment/log.d.ts +3 -0
  120. package/lib/rest/serverless/v1/service/function/functionVersion.d.ts +3 -0
  121. package/lib/rest/studio/v1/flow/engagement/step.d.ts +6 -0
  122. package/lib/rest/studio/v1/flow/engagement/step.js +2 -0
  123. package/lib/rest/studio/v1/flow/engagement.d.ts +3 -0
  124. package/lib/rest/studio/v1/flow/execution/executionStep.d.ts +6 -0
  125. package/lib/rest/studio/v1/flow/execution/executionStep.js +2 -0
  126. package/lib/rest/studio/v1/flow/execution.d.ts +3 -0
  127. package/lib/rest/studio/v1/flow.d.ts +3 -0
  128. package/lib/rest/studio/v2/flow/execution/executionStep.d.ts +6 -0
  129. package/lib/rest/studio/v2/flow/execution/executionStep.js +2 -0
  130. package/lib/rest/studio/v2/flow/execution.d.ts +3 -0
  131. package/lib/rest/studio/v2/flow/flowRevision.d.ts +3 -0
  132. package/lib/rest/studio/v2/flow.d.ts +3 -0
  133. package/lib/rest/supersim/v1/esimProfile.d.ts +3 -0
  134. package/lib/rest/supersim/v1/fleet.d.ts +3 -0
  135. package/lib/rest/supersim/v1/ipCommand.d.ts +9 -0
  136. package/lib/rest/supersim/v1/settingsUpdate.d.ts +3 -0
  137. package/lib/rest/supersim/v1/sim/simIpAddress.d.ts +3 -0
  138. package/lib/rest/supersim/v1/sim.d.ts +3 -0
  139. package/lib/rest/supersim/v1/smsCommand.d.ts +6 -0
  140. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +1 -1
  141. package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +3 -0
  142. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +1 -1
  143. package/lib/rest/trunking/v1/trunk.d.ts +3 -0
  144. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +3 -0
  145. package/lib/rest/trusthub/v1/customerProfiles.d.ts +3 -0
  146. package/lib/rest/trusthub/v1/supportingDocument.d.ts +3 -0
  147. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +3 -0
  148. package/lib/rest/trusthub/v1/trustProducts.d.ts +3 -0
  149. package/lib/rest/verify/v2/service/verification.d.ts +6 -0
  150. package/lib/rest/verify/v2/service/verificationCheck.d.ts +3 -0
  151. package/lib/rest/verify/v2/service/webhook.d.ts +6 -0
  152. package/lib/rest/verify/v2/verificationAttempt.d.ts +3 -0
  153. package/lib/rest/video/v1/composition.d.ts +6 -0
  154. package/lib/rest/video/v1/compositionHook.d.ts +3 -0
  155. package/lib/rest/video/v1/recording.d.ts +9 -0
  156. package/lib/rest/video/v1/room/participant/anonymize.d.ts +3 -0
  157. package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +3 -0
  158. package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +3 -0
  159. package/lib/rest/video/v1/room/participant.d.ts +4 -1
  160. package/lib/rest/video/v1/room/roomRecording.d.ts +9 -0
  161. package/lib/rest/wireless/v1/command.d.ts +12 -0
  162. package/lib/rest/wireless/v1/ratePlan.d.ts +6 -0
  163. package/lib/rest/wireless/v1/ratePlan.js +2 -0
  164. package/lib/rest/wireless/v1/sim.d.ts +6 -0
  165. package/package.json +1 -1
  166. package/lib/rest/preview/Sync.d.ts +0 -15
  167. package/lib/rest/preview/sync/service/document/documentPermission.d.ts +0 -280
  168. package/lib/rest/preview/sync/service/document/documentPermission.js +0 -260
  169. package/lib/rest/preview/sync/service/document.d.ts +0 -295
  170. package/lib/rest/preview/sync/service/syncList/syncListItem.d.ts +0 -321
  171. package/lib/rest/preview/sync/service/syncList/syncListItem.js +0 -286
  172. package/lib/rest/preview/sync/service/syncList/syncListPermission.d.ts +0 -280
  173. package/lib/rest/preview/sync/service/syncList/syncListPermission.js +0 -260
  174. package/lib/rest/preview/sync/service/syncList.d.ts +0 -270
  175. package/lib/rest/preview/sync/service/syncList.js +0 -270
  176. package/lib/rest/preview/sync/service/syncMap/syncMapItem.d.ts +0 -323
  177. package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +0 -290
  178. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.d.ts +0 -280
  179. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +0 -260
  180. package/lib/rest/preview/sync/service/syncMap.d.ts +0 -270
  181. package/lib/rest/preview/sync/service/syncMap.js +0 -270
  182. package/lib/rest/preview/sync/service.d.ts +0 -330
  183. package/lib/rest/preview/sync/service.js +0 -316
@@ -1,6 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V1 from "../../../V1";
4
+ /**
5
+ * The status of the Participant. Can be: `connected` or `disconnected`.
6
+ */
4
7
  export type AnonymizeStatus = "connected" | "disconnected";
5
8
  export interface AnonymizeContext {
6
9
  /**
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../../base/Page";
4
4
  import Response from "../../../../../http/response";
5
5
  import V1 from "../../../V1";
6
+ /**
7
+ * The track type. Can be: `audio`, `video` or `data`.
8
+ */
6
9
  export type PublishedTrackKind = "audio" | "video" | "data";
7
10
  /**
8
11
  * Options to pass to each
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../../base/Page";
4
4
  import Response from "../../../../../http/response";
5
5
  import V1 from "../../../V1";
6
+ /**
7
+ * The track type. Can be: `audio`, `video` or `data`.
8
+ */
6
9
  export type SubscribedTrackKind = "audio" | "video" | "data";
7
10
  /**
8
11
  * Options to pass to each
@@ -7,7 +7,10 @@ import { AnonymizeListInstance } from "./participant/anonymize";
7
7
  import { PublishedTrackListInstance } from "./participant/publishedTrack";
8
8
  import { SubscribeRulesListInstance } from "./participant/subscribeRules";
9
9
  import { SubscribedTrackListInstance } from "./participant/subscribedTrack";
10
- export type ParticipantStatus = "connected" | "disconnected";
10
+ /**
11
+ * The status of the Participant. Can be: `connected` or `disconnected`.
12
+ */
13
+ export type ParticipantStatus = "connected" | "disconnected" | "reconnecting";
11
14
  /**
12
15
  * Options to pass to update a ParticipantInstance
13
16
  */
@@ -3,9 +3,18 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V1 from "../../V1";
6
+ /**
7
+ * The codec used for the recording. Can be: `VP8` or `H264`.
8
+ */
6
9
  export type RoomRecordingCodec = "VP8" | "H264" | "OPUS" | "PCMU";
7
10
  export type RoomRecordingFormat = "mka" | "mkv";
11
+ /**
12
+ * The status of the recording. Can be: `processing`, `completed`, or `deleted`. `processing` indicates the Recording is still being captured. `completed` indicates the Recording has been captured and is now available for download. `deleted` means the recording media has been deleted from the system, but its metadata is still available for historical purposes.
13
+ */
8
14
  export type RoomRecordingStatus = "processing" | "completed" | "deleted" | "failed";
15
+ /**
16
+ * The recording\'s media type. Can be: `audio` or `video`.
17
+ */
9
18
  export type RoomRecordingType = "audio" | "video" | "data";
10
19
  /**
11
20
  * Options to pass to each
@@ -3,9 +3,21 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V1 from "../V1";
6
+ /**
7
+ * The mode used to send the SMS message. Can be: `text` or `binary`. The default SMS mode is `text`.
8
+ */
6
9
  export type CommandCommandMode = "text" | "binary";
10
+ /**
11
+ * The direction of the Command. Can be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term `mobile terminated`, and `from_sim` is synonymous with the term `mobile originated`.
12
+ */
7
13
  export type CommandDirection = "from_sim" | "to_sim";
14
+ /**
15
+ * The status of the Command. Can be: `queued`, `sent`, `delivered`, `received`, or `failed`. See [Status Values](https://www.twilio.com/docs/iot/wireless/api/command-resource#status-values) for a description of each state.
16
+ */
8
17
  export type CommandStatus = "queued" | "sent" | "delivered" | "received" | "failed";
18
+ /**
19
+ * The type of transport used. Can be: `sms` or `ip`.
20
+ */
9
21
  export type CommandTransport = "sms" | "ip";
10
22
  /**
11
23
  * Options to pass to create a CommandInstance
@@ -3,6 +3,10 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V1 from "../V1";
6
+ /**
7
+ * The way the home network (T-Mobile USA) will behave after a SIM\'s usage exceeds its `data_limit`. Can be either `block` or `throttle`. Default is `block`.
8
+ */
9
+ export type RatePlanDataLimitStrategy = "block" | "throttle";
6
10
  /**
7
11
  * Options to pass to update a RatePlanInstance
8
12
  */
@@ -38,6 +42,8 @@ export interface RatePlanListInstanceCreateOptions {
38
42
  nationalRoamingDataLimit?: number;
39
43
  /** The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB. */
40
44
  internationalRoamingDataLimit?: number;
45
+ /** */
46
+ dataLimitStrategy?: RatePlanDataLimitStrategy;
41
47
  }
42
48
  /**
43
49
  * Options to pass to each
@@ -215,6 +215,8 @@ function RatePlanListInstance(version) {
215
215
  if (params["internationalRoamingDataLimit"] !== undefined)
216
216
  data["InternationalRoamingDataLimit"] =
217
217
  params["internationalRoamingDataLimit"];
218
+ if (params["dataLimitStrategy"] !== undefined)
219
+ data["DataLimitStrategy"] = params["dataLimitStrategy"];
218
220
  const headers = {};
219
221
  headers["Content-Type"] = "application/x-www-form-urlencoded";
220
222
  headers["Accept"] = "application/json";
@@ -5,7 +5,13 @@ import Response from "../../../http/response";
5
5
  import V1 from "../V1";
6
6
  import { DataSessionListInstance } from "./sim/dataSession";
7
7
  import { UsageRecordListInstance } from "./sim/usageRecord";
8
+ /**
9
+ * The connectivity reset status of the SIM. Can be: null or `resetting`. When a connectivity reset is initiated on a SIM, this property is `resetting`. After the reset completes, it is null.
10
+ */
8
11
  export type SimResetStatus = "resetting";
12
+ /**
13
+ * The status of the Sim resource. Can be: `new`, `ready`, `active`, `deactivated`, `canceled`, `deleted`, `scheduled`, or `updating`. See [Status Values](https://www.twilio.com/docs/iot/wireless/api/sim-resource#status-values) for the description of each status.
14
+ */
9
15
  export type SimStatus = "new" | "ready" | "active" | "suspended" | "deactivated" | "canceled" | "scheduled" | "updating";
10
16
  /**
11
17
  * Options to pass to update a SimInstance
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "5.5.0",
4
+ "version": "5.5.2",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {
@@ -1,15 +0,0 @@
1
- import PreviewBase from "../PreviewBase";
2
- import Version from "../../base/Version";
3
- import { ServiceListInstance } from "./sync/service";
4
- export default class Sync extends Version {
5
- /**
6
- * Initialize the Sync version of Preview
7
- *
8
- * @param domain - The Twilio (Twilio.Preview) domain
9
- */
10
- constructor(domain: PreviewBase);
11
- /** services - { Twilio.Preview.Sync.ServiceListInstance } resource */
12
- protected _services?: ServiceListInstance;
13
- /** Getter for services resource */
14
- get services(): ServiceListInstance;
15
- }
@@ -1,280 +0,0 @@
1
- /// <reference types="node" />
2
- import { inspect, InspectOptions } from "util";
3
- import Page, { TwilioResponsePayload } from "../../../../../base/Page";
4
- import Response from "../../../../../http/response";
5
- import Sync from "../../../Sync";
6
- /**
7
- * Options to pass to update a DocumentPermissionInstance
8
- */
9
- export interface DocumentPermissionContextUpdateOptions {
10
- /** Boolean flag specifying whether the identity can read the Sync Document. */
11
- read: boolean;
12
- /** Boolean flag specifying whether the identity can update the Sync Document. */
13
- write: boolean;
14
- /** Boolean flag specifying whether the identity can delete the Sync Document. */
15
- manage: boolean;
16
- }
17
- /**
18
- * Options to pass to each
19
- */
20
- export interface DocumentPermissionListInstanceEachOptions {
21
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
22
- pageSize?: number;
23
- /** Function to process each record. If this and a positional callback are passed, this one will be used */
24
- callback?: (item: DocumentPermissionInstance, done: (err?: Error) => void) => void;
25
- /** Function to be called upon completion of streaming */
26
- done?: Function;
27
- /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
28
- limit?: number;
29
- }
30
- /**
31
- * Options to pass to list
32
- */
33
- export interface DocumentPermissionListInstanceOptions {
34
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
35
- pageSize?: number;
36
- /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
37
- limit?: number;
38
- }
39
- /**
40
- * Options to pass to page
41
- */
42
- export interface DocumentPermissionListInstancePageOptions {
43
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
44
- pageSize?: number;
45
- /** Page Number, this value is simply for client state */
46
- pageNumber?: number;
47
- /** PageToken provided by the API */
48
- pageToken?: string;
49
- }
50
- export interface DocumentPermissionContext {
51
- /**
52
- * Remove a DocumentPermissionInstance
53
- *
54
- * @param callback - Callback to handle processed record
55
- *
56
- * @returns Resolves to processed boolean
57
- */
58
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
59
- /**
60
- * Fetch a DocumentPermissionInstance
61
- *
62
- * @param callback - Callback to handle processed record
63
- *
64
- * @returns Resolves to processed DocumentPermissionInstance
65
- */
66
- fetch(callback?: (error: Error | null, item?: DocumentPermissionInstance) => any): Promise<DocumentPermissionInstance>;
67
- /**
68
- * Update a DocumentPermissionInstance
69
- *
70
- * @param params - Parameter for request
71
- * @param callback - Callback to handle processed record
72
- *
73
- * @returns Resolves to processed DocumentPermissionInstance
74
- */
75
- update(params: DocumentPermissionContextUpdateOptions, callback?: (error: Error | null, item?: DocumentPermissionInstance) => any): Promise<DocumentPermissionInstance>;
76
- /**
77
- * Provide a user-friendly representation
78
- */
79
- toJSON(): any;
80
- [inspect.custom](_depth: any, options: InspectOptions): any;
81
- }
82
- export interface DocumentPermissionContextSolution {
83
- serviceSid: string;
84
- documentSid: string;
85
- identity: string;
86
- }
87
- export declare class DocumentPermissionContextImpl implements DocumentPermissionContext {
88
- protected _version: Sync;
89
- protected _solution: DocumentPermissionContextSolution;
90
- protected _uri: string;
91
- constructor(_version: Sync, serviceSid: string, documentSid: string, identity: string);
92
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
93
- fetch(callback?: (error: Error | null, item?: DocumentPermissionInstance) => any): Promise<DocumentPermissionInstance>;
94
- update(params: DocumentPermissionContextUpdateOptions, callback?: (error: Error | null, item?: DocumentPermissionInstance) => any): Promise<DocumentPermissionInstance>;
95
- /**
96
- * Provide a user-friendly representation
97
- *
98
- * @returns Object
99
- */
100
- toJSON(): DocumentPermissionContextSolution;
101
- [inspect.custom](_depth: any, options: InspectOptions): string;
102
- }
103
- interface DocumentPermissionPayload extends TwilioResponsePayload {
104
- permissions: DocumentPermissionResource[];
105
- }
106
- interface DocumentPermissionResource {
107
- account_sid: string;
108
- service_sid: string;
109
- document_sid: string;
110
- identity: string;
111
- read: boolean;
112
- write: boolean;
113
- manage: boolean;
114
- url: string;
115
- }
116
- export declare class DocumentPermissionInstance {
117
- protected _version: Sync;
118
- protected _solution: DocumentPermissionContextSolution;
119
- protected _context?: DocumentPermissionContext;
120
- constructor(_version: Sync, payload: DocumentPermissionResource, serviceSid: string, documentSid: string, identity?: string);
121
- /**
122
- * The unique SID identifier of the Twilio Account.
123
- */
124
- accountSid: string;
125
- /**
126
- * The unique SID identifier of the Sync Service Instance.
127
- */
128
- serviceSid: string;
129
- /**
130
- * The unique SID identifier of the Sync Document to which the Permission applies.
131
- */
132
- documentSid: string;
133
- /**
134
- * Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer.
135
- */
136
- identity: string;
137
- /**
138
- * Boolean flag specifying whether the identity can read the Sync Document.
139
- */
140
- read: boolean;
141
- /**
142
- * Boolean flag specifying whether the identity can update the Sync Document.
143
- */
144
- write: boolean;
145
- /**
146
- * Boolean flag specifying whether the identity can delete the Sync Document.
147
- */
148
- manage: boolean;
149
- /**
150
- * Contains an absolute URL for this Sync Document Permission.
151
- */
152
- url: string;
153
- private get _proxy();
154
- /**
155
- * Remove a DocumentPermissionInstance
156
- *
157
- * @param callback - Callback to handle processed record
158
- *
159
- * @returns Resolves to processed boolean
160
- */
161
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
162
- /**
163
- * Fetch a DocumentPermissionInstance
164
- *
165
- * @param callback - Callback to handle processed record
166
- *
167
- * @returns Resolves to processed DocumentPermissionInstance
168
- */
169
- fetch(callback?: (error: Error | null, item?: DocumentPermissionInstance) => any): Promise<DocumentPermissionInstance>;
170
- /**
171
- * Update a DocumentPermissionInstance
172
- *
173
- * @param params - Parameter for request
174
- * @param callback - Callback to handle processed record
175
- *
176
- * @returns Resolves to processed DocumentPermissionInstance
177
- */
178
- update(params: DocumentPermissionContextUpdateOptions, callback?: (error: Error | null, item?: DocumentPermissionInstance) => any): Promise<DocumentPermissionInstance>;
179
- /**
180
- * Provide a user-friendly representation
181
- *
182
- * @returns Object
183
- */
184
- toJSON(): {
185
- accountSid: string;
186
- serviceSid: string;
187
- documentSid: string;
188
- identity: string;
189
- read: boolean;
190
- write: boolean;
191
- manage: boolean;
192
- url: string;
193
- };
194
- [inspect.custom](_depth: any, options: InspectOptions): string;
195
- }
196
- export interface DocumentPermissionSolution {
197
- serviceSid: string;
198
- documentSid: string;
199
- }
200
- export interface DocumentPermissionListInstance {
201
- _version: Sync;
202
- _solution: DocumentPermissionSolution;
203
- _uri: string;
204
- (identity: string): DocumentPermissionContext;
205
- get(identity: string): DocumentPermissionContext;
206
- /**
207
- * Streams DocumentPermissionInstance records from the API.
208
- *
209
- * This operation lazily loads records as efficiently as possible until the limit
210
- * is reached.
211
- *
212
- * The results are passed into the callback function, so this operation is memory
213
- * efficient.
214
- *
215
- * If a function is passed as the first argument, it will be used as the callback
216
- * function.
217
- *
218
- * @param { DocumentPermissionListInstanceEachOptions } [params] - Options for request
219
- * @param { function } [callback] - Function to process each record
220
- */
221
- each(callback?: (item: DocumentPermissionInstance, done: (err?: Error) => void) => void): void;
222
- each(params: DocumentPermissionListInstanceEachOptions, callback?: (item: DocumentPermissionInstance, done: (err?: Error) => void) => void): void;
223
- /**
224
- * Retrieve a single target page of DocumentPermissionInstance records from the API.
225
- *
226
- * The request is executed immediately.
227
- *
228
- * @param { string } [targetUrl] - API-generated URL for the requested results page
229
- * @param { function } [callback] - Callback to handle list of records
230
- */
231
- getPage(targetUrl: string, callback?: (error: Error | null, items: DocumentPermissionPage) => any): Promise<DocumentPermissionPage>;
232
- /**
233
- * Lists DocumentPermissionInstance records from the API as a list.
234
- *
235
- * If a function is passed as the first argument, it will be used as the callback
236
- * function.
237
- *
238
- * @param { DocumentPermissionListInstanceOptions } [params] - Options for request
239
- * @param { function } [callback] - Callback to handle list of records
240
- */
241
- list(callback?: (error: Error | null, items: DocumentPermissionInstance[]) => any): Promise<DocumentPermissionInstance[]>;
242
- list(params: DocumentPermissionListInstanceOptions, callback?: (error: Error | null, items: DocumentPermissionInstance[]) => any): Promise<DocumentPermissionInstance[]>;
243
- /**
244
- * Retrieve a single page of DocumentPermissionInstance records from the API.
245
- *
246
- * The request is executed immediately.
247
- *
248
- * If a function is passed as the first argument, it will be used as the callback
249
- * function.
250
- *
251
- * @param { DocumentPermissionListInstancePageOptions } [params] - Options for request
252
- * @param { function } [callback] - Callback to handle list of records
253
- */
254
- page(callback?: (error: Error | null, items: DocumentPermissionPage) => any): Promise<DocumentPermissionPage>;
255
- page(params: DocumentPermissionListInstancePageOptions, callback?: (error: Error | null, items: DocumentPermissionPage) => any): Promise<DocumentPermissionPage>;
256
- /**
257
- * Provide a user-friendly representation
258
- */
259
- toJSON(): any;
260
- [inspect.custom](_depth: any, options: InspectOptions): any;
261
- }
262
- export declare function DocumentPermissionListInstance(version: Sync, serviceSid: string, documentSid: string): DocumentPermissionListInstance;
263
- export declare class DocumentPermissionPage extends Page<Sync, DocumentPermissionPayload, DocumentPermissionResource, DocumentPermissionInstance> {
264
- /**
265
- * Initialize the DocumentPermissionPage
266
- *
267
- * @param version - Version of the resource
268
- * @param response - Response from the API
269
- * @param solution - Path solution
270
- */
271
- constructor(version: Sync, response: Response<string>, solution: DocumentPermissionSolution);
272
- /**
273
- * Build an instance of DocumentPermissionInstance
274
- *
275
- * @param payload - Payload response from the API
276
- */
277
- getInstance(payload: DocumentPermissionResource): DocumentPermissionInstance;
278
- [inspect.custom](depth: any, options: InspectOptions): string;
279
- }
280
- export {};