@hivegpt/hiveai-angular 0.0.327 → 0.0.328

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.
@@ -2134,7 +2134,7 @@
2134
2134
  ChatDrawerComponent.prototype.makeAskRequest = function (inputMsg, agents, conversationId, msg, chat, workflowId, workflow_inputs) {
2135
2135
  var _this = this;
2136
2136
  var _a;
2137
- var url = this.environment.BASE_URL + "/ai/ask?first_name=" + this.firstName + "&last_name=" + this.lastName;
2137
+ var url = this.environment.BASE_URL + "/ai/ask";
2138
2138
  var body = {
2139
2139
  user_question: inputMsg,
2140
2140
  user_id: this.userId,
@@ -2142,18 +2142,33 @@
2142
2142
  message_id: this.conversationService.generateKey(),
2143
2143
  agents: (_a = agents === null || agents === void 0 ? void 0 : agents.filter(function (p) { return p.selected; }).map(function (p) { return p.id; })) !== null && _a !== void 0 ? _a : [],
2144
2144
  conversation_id: conversationId,
2145
+ first_name: this.firstName,
2146
+ last_name: this.lastName
2145
2147
  };
2146
2148
  if (workflowId) {
2147
2149
  body['workflow_id'] = workflowId;
2148
2150
  body['workflow_inputs'] = workflow_inputs;
2149
2151
  }
2152
+ var domain = window.location.hostname;
2153
+ // Determine the header value based on the domain
2154
+ var domainAuthorityValue = '';
2155
+ if (domain.includes('pre-app.social27.com')) {
2156
+ domainAuthorityValue = 'pre-prod-lite';
2157
+ }
2158
+ else if (domain.includes('app.social27.com')) {
2159
+ domainAuthorityValue = 'prod-lite';
2160
+ }
2161
+ else if (domain.includes('hivegpt.io')) {
2162
+ domainAuthorityValue = 'hivegpt';
2163
+ }
2150
2164
  fetch(url, {
2151
2165
  method: 'POST',
2152
2166
  headers: {
2153
2167
  'Content-Type': 'application/json',
2154
2168
  Authorization: 'Bearer ' + this.s27Token,
2155
2169
  'x-api-key': this.apiKey,
2156
- 'hive-bot-id': this.botId
2170
+ 'hive-bot-id': this.botId,
2171
+ 'domain-authority': domainAuthorityValue
2157
2172
  },
2158
2173
  body: JSON.stringify(body),
2159
2174
  })