teleleo 0.0.0-stage → 0.2.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.
Files changed (140) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/LICENSE +21 -0
  3. package/README.md +236 -2
  4. package/api.md +187 -0
  5. package/dist/client.d.ts +28 -0
  6. package/dist/client.d.ts.map +1 -0
  7. package/dist/client.js +27 -0
  8. package/dist/client.js.map +1 -0
  9. package/dist/core.d.ts +66 -0
  10. package/dist/core.d.ts.map +1 -0
  11. package/dist/core.js +195 -0
  12. package/dist/core.js.map +1 -0
  13. package/dist/errors.d.ts +92 -0
  14. package/dist/errors.d.ts.map +1 -0
  15. package/dist/errors.js +163 -0
  16. package/dist/errors.js.map +1 -0
  17. package/dist/index.d.ts +23 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +23 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/pagination.d.ts +41 -0
  22. package/dist/pagination.d.ts.map +1 -0
  23. package/dist/pagination.js +98 -0
  24. package/dist/pagination.js.map +1 -0
  25. package/dist/resource.d.ts +7 -0
  26. package/dist/resource.d.ts.map +1 -0
  27. package/dist/resource.js +8 -0
  28. package/dist/resource.js.map +1 -0
  29. package/dist/resources/call-scenarios.d.ts +77 -0
  30. package/dist/resources/call-scenarios.d.ts.map +1 -0
  31. package/dist/resources/call-scenarios.js +137 -0
  32. package/dist/resources/call-scenarios.js.map +1 -0
  33. package/dist/resources/calls.d.ts +69 -0
  34. package/dist/resources/calls.d.ts.map +1 -0
  35. package/dist/resources/calls.js +109 -0
  36. package/dist/resources/calls.js.map +1 -0
  37. package/dist/resources/contact-groups.d.ts +65 -0
  38. package/dist/resources/contact-groups.d.ts.map +1 -0
  39. package/dist/resources/contact-groups.js +99 -0
  40. package/dist/resources/contact-groups.js.map +1 -0
  41. package/dist/resources/contacts.d.ts +75 -0
  42. package/dist/resources/contacts.d.ts.map +1 -0
  43. package/dist/resources/contacts.js +132 -0
  44. package/dist/resources/contacts.js.map +1 -0
  45. package/dist/resources/dongles.d.ts +201 -0
  46. package/dist/resources/dongles.d.ts.map +1 -0
  47. package/dist/resources/dongles.js +296 -0
  48. package/dist/resources/dongles.js.map +1 -0
  49. package/dist/resources/files.d.ts +52 -0
  50. package/dist/resources/files.d.ts.map +1 -0
  51. package/dist/resources/files.js +73 -0
  52. package/dist/resources/files.js.map +1 -0
  53. package/dist/resources/follow-up-sms-settings.d.ts +65 -0
  54. package/dist/resources/follow-up-sms-settings.d.ts.map +1 -0
  55. package/dist/resources/follow-up-sms-settings.js +111 -0
  56. package/dist/resources/follow-up-sms-settings.js.map +1 -0
  57. package/dist/resources/index.d.ts +50 -0
  58. package/dist/resources/index.d.ts.map +1 -0
  59. package/dist/resources/index.js +36 -0
  60. package/dist/resources/index.js.map +1 -0
  61. package/dist/resources/mailings.d.ts +85 -0
  62. package/dist/resources/mailings.d.ts.map +1 -0
  63. package/dist/resources/mailings.js +191 -0
  64. package/dist/resources/mailings.js.map +1 -0
  65. package/dist/resources/public-vpn.d.ts +51 -0
  66. package/dist/resources/public-vpn.d.ts.map +1 -0
  67. package/dist/resources/public-vpn.js +67 -0
  68. package/dist/resources/public-vpn.js.map +1 -0
  69. package/dist/resources/redirections.d.ts +65 -0
  70. package/dist/resources/redirections.d.ts.map +1 -0
  71. package/dist/resources/redirections.js +113 -0
  72. package/dist/resources/redirections.js.map +1 -0
  73. package/dist/resources/sip-users.d.ts +30 -0
  74. package/dist/resources/sip-users.d.ts.map +1 -0
  75. package/dist/resources/sip-users.js +40 -0
  76. package/dist/resources/sip-users.js.map +1 -0
  77. package/dist/resources/sms.d.ts +116 -0
  78. package/dist/resources/sms.d.ts.map +1 -0
  79. package/dist/resources/sms.js +203 -0
  80. package/dist/resources/sms.js.map +1 -0
  81. package/dist/resources/socks-proxies.d.ts +65 -0
  82. package/dist/resources/socks-proxies.d.ts.map +1 -0
  83. package/dist/resources/socks-proxies.js +91 -0
  84. package/dist/resources/socks-proxies.js.map +1 -0
  85. package/dist/resources/ussd.d.ts +71 -0
  86. package/dist/resources/ussd.d.ts.map +1 -0
  87. package/dist/resources/ussd.js +89 -0
  88. package/dist/resources/ussd.js.map +1 -0
  89. package/dist/types/enums.d.ts +280 -0
  90. package/dist/types/enums.d.ts.map +1 -0
  91. package/dist/types/enums.js +233 -0
  92. package/dist/types/enums.js.map +1 -0
  93. package/dist/types/index.d.ts +4 -0
  94. package/dist/types/index.d.ts.map +1 -0
  95. package/dist/types/index.js +5 -0
  96. package/dist/types/index.js.map +1 -0
  97. package/dist/types/models.d.ts +686 -0
  98. package/dist/types/models.d.ts.map +1 -0
  99. package/dist/types/models.js +3 -0
  100. package/dist/types/models.js.map +1 -0
  101. package/dist/types/params.d.ts +711 -0
  102. package/dist/types/params.d.ts.map +1 -0
  103. package/dist/types/params.js +3 -0
  104. package/dist/types/params.js.map +1 -0
  105. package/dist/utils.d.ts +32 -0
  106. package/dist/utils.d.ts.map +1 -0
  107. package/dist/utils.js +118 -0
  108. package/dist/utils.js.map +1 -0
  109. package/dist/version.d.ts +2 -0
  110. package/dist/version.d.ts.map +1 -0
  111. package/dist/version.js +2 -0
  112. package/dist/version.js.map +1 -0
  113. package/package.json +63 -4
  114. package/src/client.ts +42 -0
  115. package/src/core.ts +278 -0
  116. package/src/errors.ts +170 -0
  117. package/src/index.ts +46 -0
  118. package/src/pagination.ts +110 -0
  119. package/src/resource.ts +10 -0
  120. package/src/resources/call-scenarios.ts +154 -0
  121. package/src/resources/calls.ts +117 -0
  122. package/src/resources/contact-groups.ts +115 -0
  123. package/src/resources/contacts.ts +149 -0
  124. package/src/resources/dongles.ts +346 -0
  125. package/src/resources/files.ts +79 -0
  126. package/src/resources/follow-up-sms-settings.ts +130 -0
  127. package/src/resources/index.ts +86 -0
  128. package/src/resources/mailings.ts +207 -0
  129. package/src/resources/public-vpn.ts +72 -0
  130. package/src/resources/redirections.ts +129 -0
  131. package/src/resources/sip-users.ts +44 -0
  132. package/src/resources/sms.ts +232 -0
  133. package/src/resources/socks-proxies.ts +107 -0
  134. package/src/resources/ussd.ts +97 -0
  135. package/src/types/enums.ts +300 -0
  136. package/src/types/index.ts +5 -0
  137. package/src/types/models.ts +747 -0
  138. package/src/types/params.ts +767 -0
  139. package/src/utils.ts +123 -0
  140. package/src/version.ts +1 -0
@@ -0,0 +1,99 @@
1
+ // File generated from spec/openapi.yaml by scripts/generate.mjs. Do not edit by hand.
2
+ import { APIResource } from '../resource.js';
3
+ import { asStatus, pathParam } from '../utils.js';
4
+ /** Groups of contacts, used by mailings, call scenarios and redirections. */
5
+ export class ContactGroupsResource extends APIResource {
6
+ /**
7
+ * List contact groups.
8
+ *
9
+ * Contact groups of the account. Newest first by default (the id descending).
10
+ *
11
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
12
+ *
13
+ * Capability the role of an organization API key needs: `contact.view`.
14
+ */
15
+ list(params = {}, options) {
16
+ return this._client.getPage('/contact-group', {
17
+ query: {
18
+ 'contact_group_ids[]': params.contact_group_ids,
19
+ 'contact_ids[]': params.contact_ids,
20
+ name: params.name,
21
+ page: params.page,
22
+ limit: params.limit,
23
+ order_by: params.order_by,
24
+ order: params.order,
25
+ },
26
+ itemKey: 'contact_groups',
27
+ options,
28
+ });
29
+ }
30
+ /**
31
+ * Create contact group.
32
+ *
33
+ * Creates a contact group with the given contacts.
34
+ *
35
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_GROUP_ERROR_WITH_SAME_NAME_ALREADY_EXIST, CONTACT_GROUP_ERROR_INVALID_CONTACT.
36
+ *
37
+ * Capability the role of an organization API key needs: `contact.manage`.
38
+ */
39
+ create(params, options) {
40
+ return this._client
41
+ .request('POST', '/contact-group', {
42
+ body: { name: params.name, contact_ids: params.contact_ids },
43
+ options,
44
+ })
45
+ .then((data) => data);
46
+ }
47
+ /**
48
+ * Get contact group.
49
+ *
50
+ * One contact group of the account.
51
+ *
52
+ * @param contactGroupId - Identifier in the path
53
+ *
54
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_GROUP_NOT_FOUND_EXCEPTION.
55
+ *
56
+ * Capability the role of an organization API key needs: `contact.view`.
57
+ */
58
+ get(contactGroupId, options) {
59
+ return this._client
60
+ .request('GET', `/contact-group/${pathParam(contactGroupId)}`, { options })
61
+ .then((data) => data);
62
+ }
63
+ /**
64
+ * Update contact group.
65
+ *
66
+ * Replaces the group: name and the set of contacts are written as sent.
67
+ *
68
+ * @param contactGroupId - Identifier in the path
69
+ *
70
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_GROUP_NOT_FOUND_EXCEPTION, CONTACT_GROUP_ERROR_WITH_SAME_NAME_ALREADY_EXIST, CONTACT_GROUP_ERROR_INVALID_CONTACT.
71
+ *
72
+ * Capability the role of an organization API key needs: `contact.manage`.
73
+ */
74
+ update(contactGroupId, params, options) {
75
+ return this._client
76
+ .request('PUT', `/contact-group/${pathParam(contactGroupId)}`, {
77
+ body: { name: params.name, contact_ids: params.contact_ids },
78
+ options,
79
+ })
80
+ .then((data) => data);
81
+ }
82
+ /**
83
+ * Delete contact group.
84
+ *
85
+ * Deletes the contact group.
86
+ *
87
+ * @param contactGroupId - Identifier in the path
88
+ *
89
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_GROUP_NOT_FOUND_EXCEPTION, CONTACT_GROUP_ERROR_REDIRECTS_ARE_PRESENT_WHILE_DELETING_CONTACT_GROUP, CONTACT_GROUP_ERROR_MAILINGS_ARE_PRESENT_WHILE_DELETING_CONTACT_GROUP.
90
+ *
91
+ * Capability the role of an organization API key needs: `contact.manage`.
92
+ */
93
+ delete(contactGroupId, options) {
94
+ return this._client
95
+ .request('DELETE', `/contact-group/${pathParam(contactGroupId)}`, { options })
96
+ .then(asStatus);
97
+ }
98
+ }
99
+ //# sourceMappingURL=contact-groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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,EAAE,CAAC;aAC1E,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAoB,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,cAAsB,EACtB,MAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO;aAChB,OAAO,CAAC,KAAK,EAAE,kBAAkB,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE;YAC7D,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE;YAC5D,OAAO;SACR,CAAC;aACD,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAoB,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO;aAChB,OAAO,CAAC,QAAQ,EAAE,kBAAkB,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;aAC7E,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,75 @@
1
+ import type { RequestOptions } from '../core.js';
2
+ import type { PagePromise } from '../pagination.js';
3
+ import { APIResource } from '../resource.js';
4
+ import type { Contact, ContactImportResult } from '../types/models.js';
5
+ import type { ContactsCreateParams, ContactsImportContactsParams, ContactsListParams, ContactsUpdateParams } from '../types/params.js';
6
+ /** Address book of the account. */
7
+ export declare class ContactsResource extends APIResource {
8
+ /**
9
+ * List contacts.
10
+ *
11
+ * Contacts of the account. Filters combine with AND. Newest first by default (the id descending).
12
+ *
13
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
14
+ *
15
+ * Capability the role of an organization API key needs: `contact.view`.
16
+ */
17
+ list(params?: ContactsListParams, options?: RequestOptions): PagePromise<Contact>;
18
+ /**
19
+ * Create contact.
20
+ *
21
+ * Creates a contact. The phone number is normalised to E.164; a number that already belongs to a contact of the account is refused.
22
+ *
23
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_ERROR_IDENTIFIER_INVALID_EMAIL_FORMAT, CONTACT_ERROR_IDENTIFIER_BIG_NAME, CONTACT_ERROR_IDENTIFIER_BIG_PHONE, CONTACT_ERROR_IDENTIFIER_INVALID_PHONE, CONTACT_ERROR_IDENTIFIER_ALREADY_EXISTS_SAME_NAME, CONTACT_ERROR_IDENTIFIER_ALREADY_EXISTS_SAME_NUMBER, CONTACT_MANAGEMENT_INVALID_CONTACT_GROUP_EXCEPTION.
24
+ *
25
+ * Capability the role of an organization API key needs: `contact.manage`.
26
+ */
27
+ create(params: ContactsCreateParams, options?: RequestOptions): Promise<Contact>;
28
+ /**
29
+ * Get contact.
30
+ *
31
+ * One contact of the account.
32
+ *
33
+ * @param contactId - Identifier in the path
34
+ *
35
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_NOT_FOUND_EXCEPTION.
36
+ *
37
+ * Capability the role of an organization API key needs: `contact.view`.
38
+ */
39
+ get(contactId: number, options?: RequestOptions): Promise<Contact>;
40
+ /**
41
+ * Update contact.
42
+ *
43
+ * Replaces the contact: phone, name and the set of groups are written as sent.
44
+ *
45
+ * @param contactId - Identifier in the path
46
+ *
47
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_NOT_FOUND_EXCEPTION, CONTACT_ERROR_IDENTIFIER_INVALID_EMAIL_FORMAT, CONTACT_ERROR_IDENTIFIER_BIG_NAME, CONTACT_ERROR_IDENTIFIER_BIG_PHONE, CONTACT_ERROR_IDENTIFIER_INVALID_PHONE, CONTACT_ERROR_IDENTIFIER_ALREADY_EXISTS_SAME_NAME, CONTACT_ERROR_IDENTIFIER_ALREADY_EXISTS_SAME_NUMBER, CONTACT_MANAGEMENT_INVALID_CONTACT_GROUP_EXCEPTION.
48
+ *
49
+ * Capability the role of an organization API key needs: `contact.manage`.
50
+ */
51
+ update(contactId: number, params: ContactsUpdateParams, options?: RequestOptions): Promise<Contact>;
52
+ /**
53
+ * Delete contact.
54
+ *
55
+ * Deletes the contact.
56
+ *
57
+ * @param contactId - Identifier in the path
58
+ *
59
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_NOT_FOUND_EXCEPTION, CONTACT_ERROR_REDIRECTS_ARE_PRESENT_WHILE_DELETING_CONTACT, CONTACT_ERROR_MAILINGS_ARE_PRESENT_WHILE_DELETING_CONTACT.
60
+ *
61
+ * Capability the role of an organization API key needs: `contact.manage`.
62
+ */
63
+ delete(contactId: number, options?: RequestOptions): Promise<boolean>;
64
+ /**
65
+ * Import contacts.
66
+ *
67
+ * Bulk creation of contacts from the body; duplicates by phone number are skipped.
68
+ *
69
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_IMPORT_ERROR_IDENTIFIER_EMPTY_DATA, CONTACT_GROUP_ERROR_WITH_SAME_NAME_ALREADY_EXIST.
70
+ *
71
+ * Capability the role of an organization API key needs: `contact.manage`.
72
+ */
73
+ importContacts(params: ContactsImportContactsParams, options?: RequestOptions): Promise<ContactImportResult>;
74
+ }
75
+ //# sourceMappingURL=contacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/resources/contacts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAE5B,mCAAmC;AACnC,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;OAQG;IACH,IAAI,CAAC,MAAM,GAAE,kBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,OAAO,CAAC;IAoBrF;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAchF;;;;;;;;;;OAUG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAMlE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAcnG;;;;;;;;;;OAUG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrE;;;;;;;;OAQG;IACH,cAAc,CACZ,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,mBAAmB,CAAC;CAYhC"}
@@ -0,0 +1,132 @@
1
+ // File generated from spec/openapi.yaml by scripts/generate.mjs. Do not edit by hand.
2
+ import { APIResource } from '../resource.js';
3
+ import { asStatus, pathParam } from '../utils.js';
4
+ /** Address book of the account. */
5
+ export class ContactsResource extends APIResource {
6
+ /**
7
+ * List contacts.
8
+ *
9
+ * Contacts of the account. Filters combine with AND. Newest first by default (the id descending).
10
+ *
11
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
12
+ *
13
+ * Capability the role of an organization API key needs: `contact.view`.
14
+ */
15
+ list(params = {}, options) {
16
+ return this._client.getPage('/contact', {
17
+ query: {
18
+ 'contact_group_ids[]': params.contact_group_ids,
19
+ 'contact_ids[]': params.contact_ids,
20
+ name: params.name,
21
+ query: params.query,
22
+ phone: params.phone,
23
+ email: params.email,
24
+ 'phones[]': params.phones,
25
+ page: params.page,
26
+ limit: params.limit,
27
+ order_by: params.order_by,
28
+ order: params.order,
29
+ },
30
+ itemKey: 'contacts',
31
+ options,
32
+ });
33
+ }
34
+ /**
35
+ * Create contact.
36
+ *
37
+ * Creates a contact. The phone number is normalised to E.164; a number that already belongs to a contact of the account is refused.
38
+ *
39
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_ERROR_IDENTIFIER_INVALID_EMAIL_FORMAT, CONTACT_ERROR_IDENTIFIER_BIG_NAME, CONTACT_ERROR_IDENTIFIER_BIG_PHONE, CONTACT_ERROR_IDENTIFIER_INVALID_PHONE, CONTACT_ERROR_IDENTIFIER_ALREADY_EXISTS_SAME_NAME, CONTACT_ERROR_IDENTIFIER_ALREADY_EXISTS_SAME_NUMBER, CONTACT_MANAGEMENT_INVALID_CONTACT_GROUP_EXCEPTION.
40
+ *
41
+ * Capability the role of an organization API key needs: `contact.manage`.
42
+ */
43
+ create(params, options) {
44
+ return this._client
45
+ .request('POST', '/contact', {
46
+ body: {
47
+ phone: params.phone,
48
+ name: params.name,
49
+ email: params.email,
50
+ contact_group_ids: params.contact_group_ids,
51
+ },
52
+ options,
53
+ })
54
+ .then((data) => data);
55
+ }
56
+ /**
57
+ * Get contact.
58
+ *
59
+ * One contact of the account.
60
+ *
61
+ * @param contactId - Identifier in the path
62
+ *
63
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_NOT_FOUND_EXCEPTION.
64
+ *
65
+ * Capability the role of an organization API key needs: `contact.view`.
66
+ */
67
+ get(contactId, options) {
68
+ return this._client
69
+ .request('GET', `/contact/${pathParam(contactId)}`, { options })
70
+ .then((data) => data);
71
+ }
72
+ /**
73
+ * Update contact.
74
+ *
75
+ * Replaces the contact: phone, name and the set of groups are written as sent.
76
+ *
77
+ * @param contactId - Identifier in the path
78
+ *
79
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_NOT_FOUND_EXCEPTION, CONTACT_ERROR_IDENTIFIER_INVALID_EMAIL_FORMAT, CONTACT_ERROR_IDENTIFIER_BIG_NAME, CONTACT_ERROR_IDENTIFIER_BIG_PHONE, CONTACT_ERROR_IDENTIFIER_INVALID_PHONE, CONTACT_ERROR_IDENTIFIER_ALREADY_EXISTS_SAME_NAME, CONTACT_ERROR_IDENTIFIER_ALREADY_EXISTS_SAME_NUMBER, CONTACT_MANAGEMENT_INVALID_CONTACT_GROUP_EXCEPTION.
80
+ *
81
+ * Capability the role of an organization API key needs: `contact.manage`.
82
+ */
83
+ update(contactId, params, options) {
84
+ return this._client
85
+ .request('PUT', `/contact/${pathParam(contactId)}`, {
86
+ body: {
87
+ phone: params.phone,
88
+ name: params.name,
89
+ email: params.email,
90
+ contact_group_ids: params.contact_group_ids,
91
+ },
92
+ options,
93
+ })
94
+ .then((data) => data);
95
+ }
96
+ /**
97
+ * Delete contact.
98
+ *
99
+ * Deletes the contact.
100
+ *
101
+ * @param contactId - Identifier in the path
102
+ *
103
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_NOT_FOUND_EXCEPTION, CONTACT_ERROR_REDIRECTS_ARE_PRESENT_WHILE_DELETING_CONTACT, CONTACT_ERROR_MAILINGS_ARE_PRESENT_WHILE_DELETING_CONTACT.
104
+ *
105
+ * Capability the role of an organization API key needs: `contact.manage`.
106
+ */
107
+ delete(contactId, options) {
108
+ return this._client.request('DELETE', `/contact/${pathParam(contactId)}`, { options }).then(asStatus);
109
+ }
110
+ /**
111
+ * Import contacts.
112
+ *
113
+ * Bulk creation of contacts from the body; duplicates by phone number are skipped.
114
+ *
115
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, CONTACT_IMPORT_ERROR_IDENTIFIER_EMPTY_DATA, CONTACT_GROUP_ERROR_WITH_SAME_NAME_ALREADY_EXIST.
116
+ *
117
+ * Capability the role of an organization API key needs: `contact.manage`.
118
+ */
119
+ importContacts(params, options) {
120
+ return this._client
121
+ .request('POST', '/contact/import', {
122
+ body: {
123
+ data: params.data,
124
+ contact_group_id: params.contact_group_id,
125
+ contact_group_name: params.contact_group_name,
126
+ },
127
+ options,
128
+ })
129
+ .then((data) => data);
130
+ }
131
+ }
132
+ //# sourceMappingURL=contacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/resources/contacts.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAItF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAQ7C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,mCAAmC;AACnC,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;OAQG;IACH,IAAI,CAAC,SAA6B,EAAE,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAU,UAAU,EAAE;YAC/C,KAAK,EAAE;gBACL,qBAAqB,EAAE,MAAM,CAAC,iBAAiB;gBAC/C,eAAe,EAAE,MAAM,CAAC,WAAW;gBACnC,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,UAAU,EAAE,MAAM,CAAC,MAAM;gBACzB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB;YACD,OAAO,EAAE,UAAU;YACnB,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,MAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO;aA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AAI,CAAC,QAAQ,CAAC,CAAC;IACxG,CAAC;IAED;;;;;;;;OAQG;IACH,cAAc,CACZ,MAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO;aAChB,OAAO,CAAC,MAAM,EAAE,iBAAiB,EAAE;YAClC,IAAI,EAAE;gBACJ,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;gBACzC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;aAC9C;YACD,OAAO;SACR,CAAC;aACD,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAA2B,CAAC,CAAC;IACjD,CAAC;CACF"}
@@ -0,0 +1,201 @@
1
+ import type { RequestOptions } from '../core.js';
2
+ import type { PagePromise } from '../pagination.js';
3
+ import { APIResource } from '../resource.js';
4
+ import type { Dongle, DongleListItem, DongleNetworkInfo, DongleSimIdentifiers, DongleStatistic, DongleWifiClientList } from '../types/models.js';
5
+ import type { DonglesEnableWifiExtenderParams, DonglesListParams, DonglesListStatisticsParams, DonglesSetNumberParams, DonglesSetWifiCredentialsParams, DonglesUpdateOfflineNotificationParams, DonglesUpdateParams } from '../types/params.js';
6
+ /** Modems of the account and their commands: reboot, Wi-Fi, Wi-Fi extender, number, network info. */
7
+ export declare class DonglesResource extends APIResource {
8
+ /**
9
+ * List modems.
10
+ *
11
+ * Modems of the account. In full mode every field of the Dongle schema that the list serves is returned; dongle_setting and public_vpn_server are present in full mode only. The cheapest call is GET /dongle?is_short=1&limit=1: use it to check that an API key works. Newest first by default (created_at descending, then the id descending).
12
+ *
13
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION.
14
+ *
15
+ * Capability the role of an organization API key needs: `device.view`.
16
+ */
17
+ list(params?: DonglesListParams, options?: RequestOptions): PagePromise<DongleListItem>;
18
+ /**
19
+ * Reboot modem.
20
+ *
21
+ * 200 means the reboot is accepted, not done: dongle_online_status becomes 7 (REBOOTING) at once and goes back to an online or offline status when the modem returns. A repeated call while a reboot is in progress (about 180 s for the API stage, then the SMS stage) is a no-op that also answers 200. The reboot is accepted regardless of the subscription and of the online state; track progress through dongle_online_status in GET /dongle or GET /dongle/{dongle_id}.
22
+ *
23
+ * @param dongleId - Identifier in the path
24
+ *
25
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION.
26
+ *
27
+ * Capability the role of an organization API key needs: `device.manage`.
28
+ */
29
+ reboot(dongleId: number, options?: RequestOptions): Promise<boolean>;
30
+ /**
31
+ * List devices on modem Wi-Fi.
32
+ *
33
+ * Devices connected to the Wi-Fi hotspot of the modem. The modem is asked only when this is called; its answer, a failure included, is kept for 20 seconds: a call within that time gets it without asking the modem again, and updated_at tells when the modem answered. Turning Wi-Fi on or off and new Wi-Fi credentials drop the kept answer. The computer on USB is not in the list. Available from modem firmware 4.5.8; older firmware answers 409 DONGLE_WIFI_CLIENT_LIST_NOT_SUPPORTED_EXCEPTION.
34
+ *
35
+ * @param dongleId - ID of the dongle
36
+ *
37
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_CLIENT_LIST_DONGLE_OFFLINE_EXCEPTION, DONGLE_WIFI_CLIENT_LIST_DONGLE_BUSY_EXCEPTION, DONGLE_WIFI_CLIENT_LIST_NOT_SUPPORTED_EXCEPTION, DONGLE_WIFI_CLIENT_LIST_DONGLE_UNAVAILABLE_EXCEPTION.
38
+ *
39
+ * Capability the role of an organization API key needs: `network.view`.
40
+ *
41
+ * Needs modem firmware 4.5.8 or later.
42
+ */
43
+ getWifiClients(dongleId: number, options?: RequestOptions): Promise<DongleWifiClientList>;
44
+ /**
45
+ * Enable modem Wi-Fi.
46
+ *
47
+ * Turns the Wi-Fi hotspot of the modem on; the modem must be online. Answers {"status": true} when the command is accepted; is_hotspot_enable in GET /dongle/{dongle_id} follows once the modem applied it.
48
+ *
49
+ * @param dongleId - ID of the dongle
50
+ *
51
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_ALREADY_IN_THE_SAME_STATUS_EXCEPTION, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
52
+ *
53
+ * Capability the role of an organization API key needs: `device.manage`.
54
+ */
55
+ enableWifi(dongleId: number, options?: RequestOptions): Promise<boolean>;
56
+ /**
57
+ * Disable modem Wi-Fi.
58
+ *
59
+ * Turns the Wi-Fi hotspot of the modem off; the modem must be online. Answers {"status": true} when the command is accepted.
60
+ *
61
+ * @param dongleId - ID of the dongle
62
+ *
63
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_ALREADY_IN_THE_SAME_STATUS_EXCEPTION, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
64
+ *
65
+ * Capability the role of an organization API key needs: `device.manage`.
66
+ */
67
+ disableWifi(dongleId: number, options?: RequestOptions): Promise<boolean>;
68
+ /**
69
+ * Set modem Wi-Fi credentials.
70
+ *
71
+ * Sets the name and the password of the Wi-Fi hotspot of the modem.
72
+ *
73
+ * @param dongleId - ID of the dongle
74
+ *
75
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_INVALID_SSID_EXCEPTION, DONGLE_WIFI_INVALID_PASSWORD_EXCEPTION, DONGLE_WIFI_API_EXCEPTION.
76
+ *
77
+ * Capability the role of an organization API key needs: `device.manage`.
78
+ */
79
+ setWifiCredentials(dongleId: number, params: DonglesSetWifiCredentialsParams, options?: RequestOptions): Promise<boolean>;
80
+ /**
81
+ * Enable Wi-Fi extender.
82
+ *
83
+ * Connects the modem to an external Wi-Fi network as a client (extender mode); the modem must be online. is_wifi_extender_processing is true in GET /dongle while the modem applies the command.
84
+ *
85
+ * @param dongleId - ID of the dongle
86
+ *
87
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, DONGLE_WIFI_EXTENDER_LOCKED_EXCEPTION, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
88
+ *
89
+ * Capability the role of an organization API key needs: `device.manage`.
90
+ */
91
+ enableWifiExtender(dongleId: number, params: DonglesEnableWifiExtenderParams, options?: RequestOptions): Promise<boolean>;
92
+ /**
93
+ * Disable Wi-Fi extender.
94
+ *
95
+ * Disconnects the modem from the external Wi-Fi network; the modem must be online.
96
+ *
97
+ * @param dongleId - ID of the dongle
98
+ *
99
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_WIFI_EXTENDER_LOCKED_EXCEPTION, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
100
+ *
101
+ * Capability the role of an organization API key needs: `device.manage`.
102
+ */
103
+ disableWifiExtender(dongleId: number, options?: RequestOptions): Promise<boolean>;
104
+ /**
105
+ * Scan Wi-Fi networks.
106
+ *
107
+ * Asks the modem to scan the Wi-Fi networks around it; the modem must be online.
108
+ *
109
+ * @param dongleId - ID of the dongle
110
+ *
111
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, BILLING_ERROR_IDENTIFIER_DONGLE_SUBSCRIPTION_NOT_ACTIVE, DONGLE_API_CONNECTION_EXCEPTION, DONGLE_API_HTTP_RESPONSE_EXCEPTION.
112
+ *
113
+ * Capability the role of an organization API key needs: `device.manage`.
114
+ */
115
+ scanWifiNetworks(dongleId: number, options?: RequestOptions): Promise<boolean>;
116
+ /**
117
+ * Set offline notification.
118
+ *
119
+ * Turns the e-mail to the owner about the modem going offline on or off; shown as dongle_setting.is_offline_notification_enabled in GET /dongle.
120
+ *
121
+ * @param dongleId - ID of the dongle
122
+ *
123
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_SETTING_NOT_FOUND.
124
+ *
125
+ * Capability the role of an organization API key needs: `device.manage`.
126
+ */
127
+ updateOfflineNotification(dongleId: number, params: DonglesUpdateOfflineNotificationParams, options?: RequestOptions): Promise<boolean>;
128
+ /**
129
+ * Set modem number.
130
+ *
131
+ * Accepted asynchronously: the number is verified through the dongle and stored on success; 200 means queued.
132
+ *
133
+ * @param dongleId - ID of the dongle
134
+ *
135
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_NOT_FOUND_EXCEPTION, DONGLE_MANUAL_PHONE_DETERMINATION_NUMBER_EXCEPTION, DONGLE_MANUAL_PHONE_DETERMINATION_ALREADY_IN_PROGRESS_EXCEPTION.
136
+ *
137
+ * Capability the role of an organization API key needs: `device.manage`.
138
+ */
139
+ setNumber(dongleId: number, params: DonglesSetNumberParams, options?: RequestOptions): Promise<boolean>;
140
+ /**
141
+ * Get modem.
142
+ *
143
+ * One modem of the account with its counters and hardware identity.
144
+ *
145
+ * @param dongleId - Identifier in the path
146
+ *
147
+ * Error codes (`errorMessage`): DONGLE_ERROR_DONGLE_NOT_FOUND.
148
+ *
149
+ * Capability the role of an organization API key needs: `device.view`.
150
+ */
151
+ get(dongleId: number, options?: RequestOptions): Promise<Dongle>;
152
+ /**
153
+ * Update modem.
154
+ *
155
+ * Only the listed body fields are read; unknown fields are ignored. An omitted field keeps its value. The billing fields tariff_package_id, is_tariff_package_enabled, order_dongle_id, is_deleted and is_active and the field imei_fake are outside the public API: a body with any of them is refused as a whole with 403 PUBLIC_API_FIELD_FORBIDDEN.
156
+ *
157
+ * @param dongleId - Identifier in the path
158
+ *
159
+ * Error codes (`errorMessage`): REQUEST_VALIDATION_EXCEPTION, DONGLE_ERROR_DONGLE_NOT_FOUND, PUBLIC_API_FIELD_FORBIDDEN.
160
+ *
161
+ * Capability the role of an organization API key needs: `device.manage`.
162
+ */
163
+ update(dongleId: number, params?: DonglesUpdateParams, options?: RequestOptions): Promise<Dongle>;
164
+ /**
165
+ * Get modem network info.
166
+ *
167
+ * Asks the online modem for its radio state and returns it in the answer: networks, roaming, network type and signal. DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_HTTP_RESPONSE and DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_INVALID_CONTENT mean the modem did not answer or answered malformed data: a temporary state, the request can be repeated.
168
+ *
169
+ * @param dongleId - Identifier in the path
170
+ *
171
+ * Error codes (`errorMessage`): DONGLE_ERROR_DONGLE_NOT_FOUND, DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_HTTP_RESPONSE, DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_INVALID_CONTENT.
172
+ *
173
+ * Capability the role of an organization API key needs: `device.view`.
174
+ */
175
+ getNetworkInfo(dongleId: number, options?: RequestOptions): Promise<DongleNetworkInfo>;
176
+ /**
177
+ * Get modem SIM identifiers.
178
+ *
179
+ * Asks the online modem for the identifiers of its SIM card and returns them in the answer. DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_HTTP_RESPONSE and DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_INVALID_CONTENT mean the modem did not answer or answered malformed data: a temporary state, the request can be repeated.
180
+ *
181
+ * @param dongleId - Identifier in the path
182
+ *
183
+ * Error codes (`errorMessage`): DONGLE_ERROR_DONGLE_NOT_FOUND, DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_HTTP_RESPONSE, DONGLE_MANAGEMENT_API_ERROR_IDENTIFIER_INVALID_CONTENT.
184
+ *
185
+ * Capability the role of an organization API key needs: `device.view`.
186
+ */
187
+ getSimIdentifiers(dongleId: number, options?: RequestOptions): Promise<DongleSimIdentifiers>;
188
+ /**
189
+ * List modem traffic statistics.
190
+ *
191
+ * Traffic samples of the modem: read and write are the byte counters reported for the sample taken at time. Oldest first: sorted by time ascending. Without from and to the whole history is returned.
192
+ *
193
+ * @param dongleId - Identifier in the path
194
+ *
195
+ * Error codes (`errorMessage`): PARSING_DATE_TIME_EXCEPTION, DONGLE_ERROR_DONGLE_NOT_FOUND.
196
+ *
197
+ * Capability the role of an organization API key needs: `device.view`.
198
+ */
199
+ listStatistics(dongleId: number, params?: DonglesListStatisticsParams, options?: RequestOptions): Promise<Array<DongleStatistic>>;
200
+ }
201
+ //# sourceMappingURL=dongles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dongles.d.ts","sourceRoot":"","sources":["../../src/resources/dongles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,+BAA+B,EAC/B,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,EACtB,+BAA+B,EAC/B,sCAAsC,EACtC,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAE5B,qGAAqG;AACrG,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;;;;;OAQG;IACH,IAAI,CAAC,MAAM,GAAE,iBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;IAqB3F;;;;;;;;;;OAUG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAIpE;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,QAAQ,EAAE,M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