@scout9/admin 1.0.1 → 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 (54) hide show
  1. package/build/api.d.ts +1116 -32
  2. package/build/api.js +475 -12
  3. package/build/base.d.ts +11 -0
  4. package/build/base.js +14 -0
  5. package/build/common.d.ts +11 -0
  6. package/build/common.js +13 -0
  7. package/build/configuration.d.ts +11 -12
  8. package/build/configuration.js +13 -28
  9. package/build/index.d.ts +11 -0
  10. package/build/index.js +13 -0
  11. package/package.json +6 -2
  12. package/src/.openapi-generator/FILES +9 -0
  13. package/src/.openapi-generator/VERSION +1 -0
  14. package/src/api.ts +1417 -95
  15. package/src/base.ts +34 -17
  16. package/src/common.ts +73 -59
  17. package/src/configuration.ts +92 -115
  18. package/src/index.ts +16 -0
  19. package/tsconfig.tsbuildinfo +1 -1
  20. package/src/api-openai.txt +0 -4117
  21. package/src/schemas/common/algolia.ts +0 -24
  22. package/src/schemas/common/contact-map.ts +0 -35
  23. package/src/schemas/common/currency.ts +0 -1
  24. package/src/schemas/common/index.ts +0 -6
  25. package/src/schemas/common/location.ts +0 -6
  26. package/src/schemas/common/task.ts +0 -26
  27. package/src/schemas/common/time.ts +0 -15
  28. package/src/schemas/common.ts +0 -94
  29. package/src/schemas/conversations/context.ts +0 -64
  30. package/src/schemas/conversations/conversation.ts +0 -68
  31. package/src/schemas/conversations/index.ts +0 -6
  32. package/src/schemas/conversations/message.ts +0 -78
  33. package/src/schemas/conversations/parsed.ts +0 -5
  34. package/src/schemas/conversations/scheduled-conversation.ts +0 -35
  35. package/src/schemas/conversations/webhook.ts +0 -10
  36. package/src/schemas/index.ts +0 -3
  37. package/src/schemas/users/businesses/agents/agent.ts +0 -107
  38. package/src/schemas/users/businesses/agents/auth.ts +0 -8
  39. package/src/schemas/users/businesses/agents/index.ts +0 -2
  40. package/src/schemas/users/businesses/business-location.ts +0 -15
  41. package/src/schemas/users/businesses/business.ts +0 -43
  42. package/src/schemas/users/businesses/context/context-indexed.ts +0 -11
  43. package/src/schemas/users/businesses/context/context-saves.ts +0 -14
  44. package/src/schemas/users/businesses/context/context.ts +0 -76
  45. package/src/schemas/users/businesses/context/index.ts +0 -2
  46. package/src/schemas/users/businesses/index.ts +0 -6
  47. package/src/schemas/users/businesses/notifications.ts +0 -12
  48. package/src/schemas/users/businesses/offerings/index.ts +0 -2
  49. package/src/schemas/users/businesses/offerings/offer-indexed.ts +0 -42
  50. package/src/schemas/users/businesses/offerings/offer.ts +0 -39
  51. package/src/schemas/users/businesses/thread.ts +0 -55
  52. package/src/schemas/users/customers/customer.ts +0 -46
  53. package/src/schemas/users/customers/index.ts +0 -1
  54. package/src/schemas/users/index.ts +0 -2
@@ -1,14 +0,0 @@
1
- import { Timestamp } from '../../../common';
2
-
3
- /**
4
- * When a context field receives uploaded bulk data (csv/excel/json)
5
- * scout9-businesses/{businessId}/context/{context}/saves/{save_time}
6
- */
7
- export interface IContextSaves {
8
-
9
- /**
10
- * Where the file was saved
11
- */
12
- ref: string;
13
- time: Timestamp
14
- }
@@ -1,76 +0,0 @@
1
- import { ThreadLanguage } from '../thread';
2
-
3
- /**
4
- * Used to build NLP models to detect context invocation
5
- */
6
- export interface IContextDetectionParams {
7
-
8
- /**
9
- * Key word entities to detect in a contacts message
10
- */
11
- entities: {
12
- /**
13
- * @deprecated
14
- */
15
- utteranceId?: string;
16
- option: string;
17
- languages: ThreadLanguage[];
18
- text: string[];
19
- }[];
20
-
21
- /**
22
- * Documents or phrases to train the model
23
- */
24
- documents: {
25
- language: ThreadLanguage;
26
- text: string;
27
- id: string;
28
- }[];
29
- }
30
-
31
- /**
32
- * scout9-businesses/{businessId}/context/{$id}
33
- *
34
- * Context field to be used for conversation context and workflows
35
- */
36
- export interface IContext {
37
-
38
- /**
39
- * Context $id - this is used to store the context data under the given collection
40
- * scout9-businesses/{businessId}/{$id}/{row}
41
- */
42
- $id: string;
43
-
44
- /**
45
- * Name of the context
46
- */
47
- name: string;
48
-
49
- modifiable: boolean;
50
-
51
- /**
52
- * Description of the context
53
- */
54
- description?: string;
55
-
56
- /**
57
- * If provided, this can be used to detect if a given message is invoking this context
58
- */
59
- detection?: IContextDetectionParams;
60
-
61
- /**
62
- * The column that represents the id of a given context row
63
- */
64
- idColumn: string;
65
-
66
- /**
67
- * Column fields that could exist in the context
68
- */
69
- columns: string[];
70
-
71
- /**
72
- * If provided this will enforce that the given columns are required
73
- * NOTE: idColumn by default is required
74
- */
75
- requiredColumns?: string[];
76
- }
@@ -1,2 +0,0 @@
1
- export * from './context';
2
- export * from './context-indexed';
@@ -1,6 +0,0 @@
1
- export * from './business';
2
- export * from './business-location';
3
- export * from './agents';
4
- export * from './thread';
5
- export * from './notifications';
6
-
@@ -1,12 +0,0 @@
1
- import { Timestamp } from '../../common';
2
-
3
- export interface INotification {
4
-
5
- time: Timestamp;
6
- read?: Timestamp;
7
-
8
- content: string;
9
-
10
- href: string;
11
-
12
- }
@@ -1,2 +0,0 @@
1
- export * from './offer';
2
- export * from './offer-indexed';
@@ -1,42 +0,0 @@
1
- /**
2
- * scout9-businesses/{businessId}/offers-indexed/{offerId}
3
- * An auto generated offer, when an offer is created it will be indexed in a collection, resolving all stripe and
4
- * algolia references.
5
- */
6
- import { IOffer } from './offer';
7
-
8
- /**
9
- * @deprecated - use Context
10
- */
11
- export interface IOfferIndexed extends IOffer {
12
-
13
- /**
14
- * scout9-businesses/{businessId}/offers/{parent}
15
- */
16
- parent: string;
17
-
18
- /**
19
- * Algolia objectID
20
- */
21
- objectID: string;
22
-
23
-
24
- /**
25
- * Stripe product ID
26
- */
27
- stripe?: string;
28
-
29
- /**
30
- * Stripe product ID for dev
31
- */
32
- stripeDev?: string;
33
-
34
- /**
35
- * Algolia geolocation for the offer, offer is limited to this location at some distance
36
- */
37
- _geoloc?: {
38
- lat: number;
39
- lng: number;
40
- }
41
-
42
- }
@@ -1,39 +0,0 @@
1
- import { Currency } from '../../../common/currency';
2
-
3
- /**
4
- * scout9-businesses/{businessId}/offers/{offerId}
5
- *
6
- * What do you offer to your customers? How can your agents help them?
7
- * @deprecated - use Context
8
- */
9
- export interface IOffer {
10
- name: string;
11
- description: string;
12
-
13
- /**
14
- * Tags for the offer to be captured by the AI
15
- */
16
- tags: string[];
17
-
18
- /**
19
- * The price of the offer is either a fixed price or an estimated price range
20
- */
21
- price: number | [number, number];
22
- currency: Currency;
23
-
24
- /**
25
- * Media urls for the offer
26
- */
27
- media?: string[];
28
-
29
- /**
30
- * scout9-businesses/{businessId}/locations/{locationId}
31
- * If provided, the offer is only limited to these locations.
32
- */
33
- locations?: string[];
34
-
35
-
36
- // Stripe IDs for processing payments
37
- // stripe?: string;
38
- // stripeDev?: string;
39
- }
@@ -1,55 +0,0 @@
1
- import { IConversationContextField } from '../../conversations';
2
- import { IContextDetectionParams } from './context';
3
-
4
- /**
5
- * Languages we support
6
- */
7
- export type ThreadLanguage = 'en' | 'es';
8
-
9
- /**
10
- * Used to initiate conversations
11
- * scout9-businesses/{businessId}/threads/{threadId}
12
- */
13
- export interface IThread {
14
-
15
- /**
16
- * Name of the thread
17
- */
18
- name: string;
19
-
20
- /**
21
- * Metadata to be used to detect when this conversation should be initiated
22
- */
23
- initiators: IContextDetectionParams;
24
-
25
- /**
26
- * Fields to be loaded to a conversation
27
- */
28
- fields: IConversationContextField[];
29
-
30
- /**
31
- * About this conversation - used as initial context
32
- */
33
- context: string;
34
-
35
- /**
36
- * Public webhook when thread is created
37
- */
38
- onCreated?: string;
39
-
40
- /**
41
- * Public webhook when thread is updated
42
- */
43
- onUpdated?: string;
44
-
45
- /**
46
- * Public webhook when thread is deleted
47
- */
48
- onDeleted?: string;
49
-
50
- /**
51
- * Public webhook when thread has an error
52
- */
53
- onError?: string;
54
-
55
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * If user is blocked, we can't send messages to them, this could happen if the customer has unsubscribed from the business
3
- */
4
- import { Stripe, Timestamp } from '../../common';
5
-
6
- export interface IBlockInfo {
7
- message: string;
8
- time: Timestamp;
9
- }
10
-
11
- /**
12
- * scout9-businesses/{$business}/customers/{customerId}
13
- *
14
- * Any information that is specific to a customer (not a businesses), the customerId can be used to get the auth details
15
- * (email/phone)
16
- */
17
- export interface ICustomer extends Partial<Stripe.Address> {
18
-
19
- firstName: string;
20
- lastName: string;
21
- img?: string;
22
-
23
- /**
24
- * If this is a temp user, delete them after x days
25
- */
26
- temp?: boolean;
27
-
28
- // Id for neighborhood
29
- neighborhood?: string;
30
- neighborhoodName?: string;
31
- address?: string;
32
- addressStr?: string;
33
-
34
- blocked?: IBlockInfo;
35
-
36
- phone?: string;
37
- phoneBlocked?: IBlockInfo;
38
- email?: string;
39
- emailBlocked?: IBlockInfo;
40
-
41
- joined?: Timestamp;
42
-
43
- // Stripe IDs for processing payments
44
- stripe?: string;
45
- stripeDev?: string;
46
- }
@@ -1 +0,0 @@
1
- export * from './customer';
@@ -1,2 +0,0 @@
1
- export * from './customers';
2
- export * from './businesses';