@automagik/omni 2.260902.5 → 2.260903.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.
- package/db/drizzle/0053_gupshup_handoff_options.sql +23 -0
- package/db/drizzle/meta/_journal.json +7 -0
- package/dist/__tests__/mock-api.d.ts.map +1 -1
- package/dist/commands/instances.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/sdk/client.d.ts +1 -0
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/types.generated.d.ts +243 -0
- package/dist/sdk/types.generated.d.ts.map +1 -1
- package/dist/server/index.js +172 -39
- package/package.json +1 -1
|
@@ -2860,6 +2860,87 @@ export interface components {
|
|
|
2860
2860
|
isDefault: boolean;
|
|
2861
2861
|
/** @description Bot token for Discord instances */
|
|
2862
2862
|
token?: string;
|
|
2863
|
+
/**
|
|
2864
|
+
* @description Gupshup HANDOFF routing defaults and customerFields template (gupshup instances only). Read by the plugin at connect: restart the instance after changing it. null clears it
|
|
2865
|
+
* @example {
|
|
2866
|
+
* "defaultFields": {
|
|
2867
|
+
* "queue": "SALES"
|
|
2868
|
+
* },
|
|
2869
|
+
* "fieldsByPhonePrefix": [
|
|
2870
|
+
* {
|
|
2871
|
+
* "prefixes": [
|
|
2872
|
+
* "5511",
|
|
2873
|
+
* "5521"
|
|
2874
|
+
* ],
|
|
2875
|
+
* "fields": {
|
|
2876
|
+
* "queue": "SALES-SOUTHEAST"
|
|
2877
|
+
* }
|
|
2878
|
+
* }
|
|
2879
|
+
* ],
|
|
2880
|
+
* "customerFields": [
|
|
2881
|
+
* {
|
|
2882
|
+
* "apiKey": "Queue",
|
|
2883
|
+
* "from": "queue"
|
|
2884
|
+
* },
|
|
2885
|
+
* {
|
|
2886
|
+
* "apiKey": "Handled By",
|
|
2887
|
+
* "value": "assistant"
|
|
2888
|
+
* }
|
|
2889
|
+
* ]
|
|
2890
|
+
* }
|
|
2891
|
+
*/
|
|
2892
|
+
gupshupHandoffOptions?: {
|
|
2893
|
+
/**
|
|
2894
|
+
* @description Routing fields merged under whatever the emitter sent; explicit handoff fields always win, so system-initiated handoffs (dispatch error, silence watchdog) still land in a queue
|
|
2895
|
+
* @example {
|
|
2896
|
+
* "queue": "SALES"
|
|
2897
|
+
* }
|
|
2898
|
+
*/
|
|
2899
|
+
defaultFields?: {
|
|
2900
|
+
[key: string]: string;
|
|
2901
|
+
};
|
|
2902
|
+
/** @description Prefix rules layered over defaultFields; the first matching rule wins */
|
|
2903
|
+
fieldsByPhonePrefix?: {
|
|
2904
|
+
/**
|
|
2905
|
+
* @description Digit-only phone prefixes (country code first, no +)
|
|
2906
|
+
* @example [
|
|
2907
|
+
* "5511",
|
|
2908
|
+
* "5521"
|
|
2909
|
+
* ]
|
|
2910
|
+
*/
|
|
2911
|
+
prefixes: string[];
|
|
2912
|
+
/**
|
|
2913
|
+
* @description Routing fields applied when the customer phone starts with one of the prefixes
|
|
2914
|
+
* @example {
|
|
2915
|
+
* "queue": "SALES-SOUTHEAST"
|
|
2916
|
+
* }
|
|
2917
|
+
*/
|
|
2918
|
+
fields: {
|
|
2919
|
+
[key: string]: string;
|
|
2920
|
+
};
|
|
2921
|
+
}[];
|
|
2922
|
+
/**
|
|
2923
|
+
* @description Ordered template for the Custom Integration customerFields array. Entries whose source resolves empty are dropped; the array is only sent when non-empty
|
|
2924
|
+
* @example [
|
|
2925
|
+
* {
|
|
2926
|
+
* "apiKey": "Queue",
|
|
2927
|
+
* "from": "queue"
|
|
2928
|
+
* },
|
|
2929
|
+
* {
|
|
2930
|
+
* "apiKey": "Handled By",
|
|
2931
|
+
* "value": "assistant"
|
|
2932
|
+
* }
|
|
2933
|
+
* ]
|
|
2934
|
+
*/
|
|
2935
|
+
customerFields?: {
|
|
2936
|
+
/** @description customerFields apiKey your Gupshup Journey reads */
|
|
2937
|
+
apiKey: string;
|
|
2938
|
+
/** @description Literal value to send; mutually exclusive with `from` */
|
|
2939
|
+
value?: string;
|
|
2940
|
+
/** @description Resolved handoff field to copy the value from; mutually exclusive with `value` */
|
|
2941
|
+
from?: string;
|
|
2942
|
+
}[];
|
|
2943
|
+
} | null;
|
|
2863
2944
|
};
|
|
2864
2945
|
InstanceStatus: {
|
|
2865
2946
|
/**
|
|
@@ -6559,6 +6640,87 @@ export interface operations {
|
|
|
6559
6640
|
isDefault?: boolean;
|
|
6560
6641
|
/** @description Bot token for Discord instances */
|
|
6561
6642
|
token?: string;
|
|
6643
|
+
/**
|
|
6644
|
+
* @description Gupshup HANDOFF routing defaults and customerFields template (gupshup instances only). Read by the plugin at connect: restart the instance after changing it. null clears it
|
|
6645
|
+
* @example {
|
|
6646
|
+
* "defaultFields": {
|
|
6647
|
+
* "queue": "SALES"
|
|
6648
|
+
* },
|
|
6649
|
+
* "fieldsByPhonePrefix": [
|
|
6650
|
+
* {
|
|
6651
|
+
* "prefixes": [
|
|
6652
|
+
* "5511",
|
|
6653
|
+
* "5521"
|
|
6654
|
+
* ],
|
|
6655
|
+
* "fields": {
|
|
6656
|
+
* "queue": "SALES-SOUTHEAST"
|
|
6657
|
+
* }
|
|
6658
|
+
* }
|
|
6659
|
+
* ],
|
|
6660
|
+
* "customerFields": [
|
|
6661
|
+
* {
|
|
6662
|
+
* "apiKey": "Queue",
|
|
6663
|
+
* "from": "queue"
|
|
6664
|
+
* },
|
|
6665
|
+
* {
|
|
6666
|
+
* "apiKey": "Handled By",
|
|
6667
|
+
* "value": "assistant"
|
|
6668
|
+
* }
|
|
6669
|
+
* ]
|
|
6670
|
+
* }
|
|
6671
|
+
*/
|
|
6672
|
+
gupshupHandoffOptions?: {
|
|
6673
|
+
/**
|
|
6674
|
+
* @description Routing fields merged under whatever the emitter sent; explicit handoff fields always win, so system-initiated handoffs (dispatch error, silence watchdog) still land in a queue
|
|
6675
|
+
* @example {
|
|
6676
|
+
* "queue": "SALES"
|
|
6677
|
+
* }
|
|
6678
|
+
*/
|
|
6679
|
+
defaultFields?: {
|
|
6680
|
+
[key: string]: string;
|
|
6681
|
+
};
|
|
6682
|
+
/** @description Prefix rules layered over defaultFields; the first matching rule wins */
|
|
6683
|
+
fieldsByPhonePrefix?: {
|
|
6684
|
+
/**
|
|
6685
|
+
* @description Digit-only phone prefixes (country code first, no +)
|
|
6686
|
+
* @example [
|
|
6687
|
+
* "5511",
|
|
6688
|
+
* "5521"
|
|
6689
|
+
* ]
|
|
6690
|
+
*/
|
|
6691
|
+
prefixes: string[];
|
|
6692
|
+
/**
|
|
6693
|
+
* @description Routing fields applied when the customer phone starts with one of the prefixes
|
|
6694
|
+
* @example {
|
|
6695
|
+
* "queue": "SALES-SOUTHEAST"
|
|
6696
|
+
* }
|
|
6697
|
+
*/
|
|
6698
|
+
fields: {
|
|
6699
|
+
[key: string]: string;
|
|
6700
|
+
};
|
|
6701
|
+
}[];
|
|
6702
|
+
/**
|
|
6703
|
+
* @description Ordered template for the Custom Integration customerFields array. Entries whose source resolves empty are dropped; the array is only sent when non-empty
|
|
6704
|
+
* @example [
|
|
6705
|
+
* {
|
|
6706
|
+
* "apiKey": "Queue",
|
|
6707
|
+
* "from": "queue"
|
|
6708
|
+
* },
|
|
6709
|
+
* {
|
|
6710
|
+
* "apiKey": "Handled By",
|
|
6711
|
+
* "value": "assistant"
|
|
6712
|
+
* }
|
|
6713
|
+
* ]
|
|
6714
|
+
*/
|
|
6715
|
+
customerFields?: {
|
|
6716
|
+
/** @description customerFields apiKey your Gupshup Journey reads */
|
|
6717
|
+
apiKey: string;
|
|
6718
|
+
/** @description Literal value to send; mutually exclusive with `from` */
|
|
6719
|
+
value?: string;
|
|
6720
|
+
/** @description Resolved handoff field to copy the value from; mutually exclusive with `value` */
|
|
6721
|
+
from?: string;
|
|
6722
|
+
}[];
|
|
6723
|
+
} | null;
|
|
6562
6724
|
};
|
|
6563
6725
|
};
|
|
6564
6726
|
};
|
|
@@ -6871,6 +7033,87 @@ export interface operations {
|
|
|
6871
7033
|
isDefault?: boolean;
|
|
6872
7034
|
/** @description Bot token for Discord instances */
|
|
6873
7035
|
token?: string;
|
|
7036
|
+
/**
|
|
7037
|
+
* @description Gupshup HANDOFF routing defaults and customerFields template (gupshup instances only). Read by the plugin at connect: restart the instance after changing it. null clears it
|
|
7038
|
+
* @example {
|
|
7039
|
+
* "defaultFields": {
|
|
7040
|
+
* "queue": "SALES"
|
|
7041
|
+
* },
|
|
7042
|
+
* "fieldsByPhonePrefix": [
|
|
7043
|
+
* {
|
|
7044
|
+
* "prefixes": [
|
|
7045
|
+
* "5511",
|
|
7046
|
+
* "5521"
|
|
7047
|
+
* ],
|
|
7048
|
+
* "fields": {
|
|
7049
|
+
* "queue": "SALES-SOUTHEAST"
|
|
7050
|
+
* }
|
|
7051
|
+
* }
|
|
7052
|
+
* ],
|
|
7053
|
+
* "customerFields": [
|
|
7054
|
+
* {
|
|
7055
|
+
* "apiKey": "Queue",
|
|
7056
|
+
* "from": "queue"
|
|
7057
|
+
* },
|
|
7058
|
+
* {
|
|
7059
|
+
* "apiKey": "Handled By",
|
|
7060
|
+
* "value": "assistant"
|
|
7061
|
+
* }
|
|
7062
|
+
* ]
|
|
7063
|
+
* }
|
|
7064
|
+
*/
|
|
7065
|
+
gupshupHandoffOptions?: {
|
|
7066
|
+
/**
|
|
7067
|
+
* @description Routing fields merged under whatever the emitter sent; explicit handoff fields always win, so system-initiated handoffs (dispatch error, silence watchdog) still land in a queue
|
|
7068
|
+
* @example {
|
|
7069
|
+
* "queue": "SALES"
|
|
7070
|
+
* }
|
|
7071
|
+
*/
|
|
7072
|
+
defaultFields?: {
|
|
7073
|
+
[key: string]: string;
|
|
7074
|
+
};
|
|
7075
|
+
/** @description Prefix rules layered over defaultFields; the first matching rule wins */
|
|
7076
|
+
fieldsByPhonePrefix?: {
|
|
7077
|
+
/**
|
|
7078
|
+
* @description Digit-only phone prefixes (country code first, no +)
|
|
7079
|
+
* @example [
|
|
7080
|
+
* "5511",
|
|
7081
|
+
* "5521"
|
|
7082
|
+
* ]
|
|
7083
|
+
*/
|
|
7084
|
+
prefixes: string[];
|
|
7085
|
+
/**
|
|
7086
|
+
* @description Routing fields applied when the customer phone starts with one of the prefixes
|
|
7087
|
+
* @example {
|
|
7088
|
+
* "queue": "SALES-SOUTHEAST"
|
|
7089
|
+
* }
|
|
7090
|
+
*/
|
|
7091
|
+
fields: {
|
|
7092
|
+
[key: string]: string;
|
|
7093
|
+
};
|
|
7094
|
+
}[];
|
|
7095
|
+
/**
|
|
7096
|
+
* @description Ordered template for the Custom Integration customerFields array. Entries whose source resolves empty are dropped; the array is only sent when non-empty
|
|
7097
|
+
* @example [
|
|
7098
|
+
* {
|
|
7099
|
+
* "apiKey": "Queue",
|
|
7100
|
+
* "from": "queue"
|
|
7101
|
+
* },
|
|
7102
|
+
* {
|
|
7103
|
+
* "apiKey": "Handled By",
|
|
7104
|
+
* "value": "assistant"
|
|
7105
|
+
* }
|
|
7106
|
+
* ]
|
|
7107
|
+
*/
|
|
7108
|
+
customerFields?: {
|
|
7109
|
+
/** @description customerFields apiKey your Gupshup Journey reads */
|
|
7110
|
+
apiKey: string;
|
|
7111
|
+
/** @description Literal value to send; mutually exclusive with `from` */
|
|
7112
|
+
value?: string;
|
|
7113
|
+
/** @description Resolved handoff field to copy the value from; mutually exclusive with `value` */
|
|
7114
|
+
from?: string;
|
|
7115
|
+
}[];
|
|
7116
|
+
} | null;
|
|
6874
7117
|
};
|
|
6875
7118
|
};
|
|
6876
7119
|
};
|