Feat/real express api integration#129
Open
priyankmodiPM wants to merge 20 commits into
Open
Conversation
When an incoming WhatsApp message contains "update the discount", the webhook automatically replies to the sender with the discount image via the WhatsApp Cloud API. Phone number ID and token are read from env vars. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ant (#1) Adds a GPT decision loop (with per-phone conversation history) that routes inbound WhatsApp messages to campaign-graphic actions — listing graphics, checking allowed edits, editing via Adobe Express, and bulk generation from an uploaded file — instead of only replying to a hardcoded "update the discount" phrase. Co-authored-by: Priyank Modi <pmodi@adobe.com>
Co-authored-by: Priyank Modi <pmodi@adobe.com>
yarn.lock resolved every package from Adobe's internal Artifactory (picked up via local ~/.npmrc), which Render's build servers can't reach or validate certs for, causing "unable to get local issuer certificate" during deploy. Regenerated against registry.npmjs.org and dropped package-lock.json since render.yaml only runs yarn. Co-authored-by: Priyank Modi <pmodi@adobe.com>
app.js reads process.env.OPENAI_API_KEY but the Blueprint never declared the key, so a value set in the Render dashboard was never wired into the service, causing "Missing credentials" at boot.
…ails Model was hardcoded to gpt-4o while the configured Azure OpenAI resource only has a gpt-5.4-mini deployment, causing every request to fail with a 404 "deployment does not exist" error. Reads OPENAI_MODEL/OPENAI_BASE_URL from env instead, and logs the resolved config plus full error details on failure to make future mismatches easy to diagnose. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* docs: add design spec for mocked Adobe Express image-edit flow * docs: add implementation plan for image-edit flow * feat: add in-memory tracked-image store * feat: add mock Adobe Express API module * feat: add mock Meta media upload module * feat: extract GPT action handlers and add image-edit validation flow * feat: wire image-edit flow into the webhook and GPT tool schema * feat: map Croma earbuds graphic to Price/Address/Product Image/Partner Logo edits Replaces the New Arrival Poster mock seed image with the real Croma earbuds graphic and its allowed-edit fields. * feat: return fixed updated Croma earbuds image for any edit Any allowed edit on the Croma earbuds graphic now resolves to the fixed croma1-earbuds-updated image, sent as a new WhatsApp message, instead of a randomized mock render/upload URL. --------- Co-authored-by: Priyank Modi <pmodi@adobe.com>
Whenever an edit is requested, always send the fixed Croma earbuds image; whenever allowed-edits is asked, always reply with the fixed layer list. Removes per-template edit-key validation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replaces the mocked expressApi.js/imageStore.js/metaUpload.js flow with real tagged-documents/generate-variation/status calls against a shared docID catalog, per the brainstorming session.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Implement expressAuth.js with getAccessToken and buildAuthHeaders functions. Provides IMS token caching with 60s refresh margin per Adobe IMS v3 convention. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
If the catalog file parses successfully but isn't an array (e.g., `{}` or `42`),
treat it as an invalid catalog, log the error, and return empty array instead of
crashing on `.map()`. Aligns with design spec requirement to degrade gracefully
on catalog read failures.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…variation/status calls Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Use the real statusUrl returned by generateVariation instead of reconstructing a status URL from apiBaseUrl()+jobId, which was an unverified assumption about the API's URL shape. - Overlay image.currentEdits onto tagged elements before formatting allowed-edits messages so previously edited fields show their latest value instead of the stale original document value. - Narrow the hardcoded campaign graphics list to match the real single-entry catalog (Croma Earbuds). - Guard the sendImage call in actionEditGraphic with try/catch so a delivery failure doesn't swallow an already-successful edit; users now get a "couldn't send" message instead of no reply at all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ess/ Keeps data/ (shared catalog) and docs/ at repo root. Updates imageStore.js's default catalog path, actions.js/actions.test.js's expressApi import, and the app.js entry point in package.json/render.yaml to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.