Skip to content

Commit

Permalink
Merge branch 'feat/order-details-items-format' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobernardoaf committed Oct 17, 2024
2 parents a8befa5 + 6ff45fe commit ba187e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/goflow/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/nyaruka/goflow/flows"
"github.com/nyaruka/goflow/flows/engine"
"github.com/nyaruka/goflow/services/brain"
"github.com/nyaruka/goflow/services/meta"
"github.com/nyaruka/goflow/services/webhooks"
"github.com/nyaruka/goflow/services/wenigpt"
"github.com/nyaruka/mailroom/runtime"
Expand Down Expand Up @@ -75,6 +76,7 @@ func Engine(c *runtime.Config) flows.Engine {
WithWebhookServiceFactory(webhooks.NewServiceFactory(httpClient, httpRetries, httpAccess, webhookHeaders, c.WebhooksMaxBodyBytes)).
WithWeniGPTServiceFactory(wenigpt.NewServiceFactory(httpClient, httpRetries, httpAccess, webhookHeaders, c.WebhooksMaxBodyBytes, c.WenigptAuthToken, c.WenigptBaseURL)).
WithBrainServiceFactory(brain.NewServiceFactory(httpClient, httpRetries, httpAccess, webhookHeaders, c.WebhooksMaxBodyBytes, c.RouterAuthToken, c.RouterBaseURL)).
WithMetaServiceFactory(meta.NewServiceFactory(httpClient, httpRetries, httpAccess, webhookHeaders, c.WebhooksMaxBodyBytes, c.WhatsappSystemUserToken, c.MetaWebhookURL)).
WithClassificationServiceFactory(classificationFactory(c)).
WithEmailServiceFactory(emailFactory(c)).
WithTicketServiceFactory(ticketFactory(c)).
Expand Down Expand Up @@ -104,6 +106,7 @@ func Simulator(c *runtime.Config) flows.Engine {
WithWebhookServiceFactory(webhooks.NewServiceFactory(httpClient, nil, httpAccess, webhookHeaders, c.WebhooksMaxBodyBytes)).
WithWeniGPTServiceFactory(wenigpt.NewServiceFactory(httpClient, nil, httpAccess, webhookHeaders, c.WebhooksMaxBodyBytes, c.WenigptAuthToken, c.WenigptBaseURL)).
WithBrainServiceFactory(brain.NewServiceFactory(httpClient, httpRetries, httpAccess, webhookHeaders, c.WebhooksMaxBodyBytes, c.RouterAuthToken, c.RouterBaseURL)).
WithMetaServiceFactory(meta.NewServiceFactory(httpClient, httpRetries, httpAccess, webhookHeaders, c.WebhooksMaxBodyBytes, c.WhatsappSystemUserToken, c.MetaWebhookURL)).
WithClassificationServiceFactory(classificationFactory(c)). // simulated sessions do real classification
WithExternalServiceServiceFactory(externalServiceFactory((c))). // and real external services
WithMsgCatalogServiceFactory(msgCatalogFactory((c))). // msg catalog
Expand Down
2 changes: 2 additions & 0 deletions runtime/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ type Config struct {
RouterAuthToken string `help:"router authorization token"`

WhatsappSystemUserToken string `help:"WhatsApp system user token"`
MetaWebhookURL string `help:"Meta webhook URL"`
}

// NewDefaultConfig returns a new default configuration object
Expand Down Expand Up @@ -161,6 +162,7 @@ func NewDefaultConfig() *Config {
RouterAuthToken: "",

WhatsappSystemUserToken: "",
MetaWebhookURL: "https://graph.facebook.com/v21.0",
}
}

Expand Down

0 comments on commit ba187e9

Please sign in to comment.