@scout9/admin 1.0.0 → 1.0.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 (55) hide show
  1. package/README.md +58 -1
  2. package/build/api.d.ts +1116 -32
  3. package/build/api.js +475 -12
  4. package/build/base.d.ts +11 -0
  5. package/build/base.js +14 -0
  6. package/build/common.d.ts +11 -0
  7. package/build/common.js +13 -0
  8. package/build/configuration.d.ts +11 -12
  9. package/build/configuration.js +13 -28
  10. package/build/index.d.ts +11 -0
  11. package/build/index.js +13 -0
  12. package/package.json +6 -2
  13. package/src/.openapi-generator/FILES +9 -0
  14. package/src/.openapi-generator/VERSION +1 -0
  15. package/src/api.ts +1417 -95
  16. package/src/base.ts +34 -17
  17. package/src/common.ts +73 -59
  18. package/src/configuration.ts +92 -115
  19. package/src/index.ts +16 -0
  20. package/tsconfig.tsbuildinfo +1 -1
  21. package/src/api-openai.txt +0 -4117
  22. package/src/schemas/common/algolia.ts +0 -24
  23. package/src/schemas/common/contact-map.ts +0 -35
  24. package/src/schemas/common/currency.ts +0 -1
  25. package/src/schemas/common/index.ts +0 -6
  26. package/src/schemas/common/location.ts +0 -6
  27. package/src/schemas/common/task.ts +0 -26
  28. package/src/schemas/common/time.ts +0 -15
  29. package/src/schemas/common.ts +0 -94
  30. package/src/schemas/conversations/context.ts +0 -64
  31. package/src/schemas/conversations/conversation.ts +0 -68
  32. package/src/schemas/conversations/index.ts +0 -6
  33. package/src/schemas/conversations/message.ts +0 -78
  34. package/src/schemas/conversations/parsed.ts +0 -5
  35. package/src/schemas/conversations/scheduled-conversation.ts +0 -35
  36. package/src/schemas/conversations/webhook.ts +0 -10
  37. package/src/schemas/index.ts +0 -3
  38. package/src/schemas/users/businesses/agents/agent.ts +0 -107
  39. package/src/schemas/users/businesses/agents/auth.ts +0 -8
  40. package/src/schemas/users/businesses/agents/index.ts +0 -2
  41. package/src/schemas/users/businesses/business-location.ts +0 -15
  42. package/src/schemas/users/businesses/business.ts +0 -43
  43. package/src/schemas/users/businesses/context/context-indexed.ts +0 -11
  44. package/src/schemas/users/businesses/context/context-saves.ts +0 -14
  45. package/src/schemas/users/businesses/context/context.ts +0 -76
  46. package/src/schemas/users/businesses/context/index.ts +0 -2
  47. package/src/schemas/users/businesses/index.ts +0 -6
  48. package/src/schemas/users/businesses/notifications.ts +0 -12
  49. package/src/schemas/users/businesses/offerings/index.ts +0 -2
  50. package/src/schemas/users/businesses/offerings/offer-indexed.ts +0 -42
  51. package/src/schemas/users/businesses/offerings/offer.ts +0 -39
  52. package/src/schemas/users/businesses/thread.ts +0 -55
  53. package/src/schemas/users/customers/customer.ts +0 -46
  54. package/src/schemas/users/customers/index.ts +0 -1
  55. package/src/schemas/users/index.ts +0 -2
package/README.md CHANGED
@@ -1 +1,58 @@
1
- #
1
+ # Scout9 API
2
+
3
+ Node.js API for [Scout9](https://www.scout9.com)
4
+
5
+ ```bash
6
+ npm install @scout9/admin --save
7
+ ```
8
+
9
+ ```typescript
10
+ import { Configuration, Scout9Api } from '@scout9/admin';
11
+
12
+ const configuration = new Configuration({
13
+ apiKey: '', // Your API key
14
+ });
15
+
16
+ const scout9 = new Scout9Api(configuration);
17
+
18
+ const customer = scout9.createCustomer({
19
+ firstName: 'Hi',
20
+ lastName: 'Jack',
21
+ email: 'hi@example.com',
22
+ phone: '+15555555555',
23
+ })
24
+ .then((res) => {
25
+ console.log('Success', res);
26
+ })
27
+ .catch((err) => {
28
+ console.error('Error', err);
29
+ });
30
+
31
+
32
+ const agent = scout9.createAgent({
33
+ firstName: 'Bye',
34
+ lastName: 'Jack',
35
+ email: 'jack@company.com',
36
+ phone: '+15555555552',
37
+ })
38
+ .then((res) => {
39
+ console.log('Success', res);
40
+ })
41
+ .catch((err) => {
42
+ console.error('Error', err);
43
+ });
44
+
45
+
46
+ const conversation = await scout9.startConversation({
47
+ customer: customer.id,
48
+ agent: agent.id,
49
+ channel: 'sms',
50
+ message: 'Hello, how can I help you?',
51
+ })
52
+ .then((res) => {
53
+ console.log('Success', res);
54
+ })
55
+ .catch((err) => {
56
+ console.error('Error', err);
57
+ });
58
+ ```