Add AgenticIdentity API surface#631
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
d9cdc6f to
1e16710
Compare
94dbb33 to
089807c
Compare
1e16710 to
72a4732
Compare
089807c to
a8f0e2c
Compare
72a4732 to
19b5bc3
Compare
a8f0e2c to
eb8d2e2
Compare
19b5bc3 to
53c5fef
Compare
c92e38c to
b57702e
Compare
There was a problem hiding this comment.
Pull request overview
Adds a standardized RequestOptions API surface across the Teams API clients so callers can (a) override serviceUrl per request and (b) pass an agenticIdentity that flows through to the auth provider interceptor via request extensions.
Changes:
- Introduces
RequestOptions, plus helper utilitiesagenticIdentityExtension()andresolveServiceUrl(). - Updates multiple client methods (conversations/activities & members, meetings, reactions, teams) to accept optional
RequestOptionsand thread them into HTTP calls. - Updates and extends unit tests to validate option passing (service URL override + agentic identity extensions).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/apps/src/activity-sender.spec.ts | Updates expectations to account for the extra (empty) request config object passed through the API client calls. |
| packages/api/src/clients/team.ts | Adds RequestOptions support for team reads and serviceUrl override resolution. |
| packages/api/src/clients/team.spec.ts | Updates tests and adds coverage for serviceUrl override + agentic identity extensions. |
| packages/api/src/clients/request-options.ts | New shared request options types/helpers (agentic identity extensions + serviceUrl resolution). |
| packages/api/src/clients/reaction/reaction.ts | Adds RequestOptions support and forwards agentic identity extensions and serviceUrl override. |
| packages/api/src/clients/reaction/reaction.spec.ts | Updates tests and adds coverage for serviceUrl override + agentic identity extensions. |
| packages/api/src/clients/meeting.ts | Adds RequestOptions support for meeting APIs and forwards agentic identity extensions and serviceUrl override. |
| packages/api/src/clients/meeting.spec.ts | Updates tests and adds coverage for serviceUrl override + agentic identity extensions. |
| packages/api/src/clients/index.ts | Exports the new request-options surface from the clients barrel. |
| packages/api/src/clients/conversation/members.spec.ts | Updates conversation member client tests to include the new request config argument. |
| packages/api/src/clients/conversation/member.ts | Adds RequestOptions support for conversation member APIs and threads options into HTTP calls. |
| packages/api/src/clients/conversation/index.ts | Extends conversation client sub-APIs to accept RequestOptions in their method signatures. |
| packages/api/src/clients/conversation/activity.ts | Adds RequestOptions support for activity APIs, including serviceUrl override resolution and agentic identity extensions (non-targeted). |
| packages/api/src/clients/conversation/activity.spec.ts | Updates tests and adds coverage for serviceUrl override + agentic identity extensions. |
| packages/api/src/clients/auth.ts | Re-exports AGENTIC_IDENTITY_EXTENSION to make it part of the auth surface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
53c5fef to
0420261
Compare
b57702e to
fbf0cbd
Compare
0420261 to
79309bc
Compare
fbf0cbd to
c5dfbda
Compare
79309bc to
bdf4270
Compare
c5dfbda to
76ad125
Compare
bdf4270 to
ae21553
Compare
76ad125 to
3cc0104
Compare
| `${this.serviceUrl}/v3/conversations/${conversationId}/activities?isTargetedActivity=true`, | ||
| params | ||
| ); | ||
| async createTargeted(conversationId: string, params: ActivityParams, options?: RequestOptions<'serviceUrl'>) { |
There was a problem hiding this comment.
in PY, create_targeted accepts agentic_identity. Is this difference intentional?
There was a problem hiding this comment.
corinagum
left a comment
There was a problem hiding this comment.
Encoding path params seems correct, but Teams conversation IDs contain : / @ / ; , so this changes the bytes we send to the connector. Could you confirm the connector accepts %3A / %40 -encoded IDs, (b) apply it consistently, and (c) mirror it in Python?
Targeted methods drop agenticIdentity but Python keeps it. The description says targeted methods are RequestOptions<'serviceUrl'> by design, but Python's create_targeted/update_targeted/delete_targeted do accept agentic_identity and attach the extension. Is the TS asymmetry intentional? If so a one-line note on why would help; if not, we have a cross-SDK gap.
ae21553 to
4bd79dd
Compare
3cc0104 to
4d38786
Compare
4bd79dd to
e61cd55
Compare
4d38786 to
6ddcadd
Compare
e61cd55 to
b4b82f7
Compare
6ddcadd to
711a6ac
Compare
I'm removing the encoding logic. It seems like something we can pick up separately (if needed). |
bff3ee5 to
ef6df69
Compare
b4b82f7 to
a92c9ad
Compare
ef6df69 to
64922a6
Compare
a92c9ad to
b965beb
Compare
64922a6 to
b2a0d57
Compare
b965beb to
c62f6ec
Compare
b2a0d57 to
56bb113
Compare
Adds
RequestOptionsto all API methods that support agentic identity and/or service URL override:RequestOptions<K>type —Pick<{ agenticIdentity?, serviceUrl? }, K>agenticIdentityExtension(options)— converts options to HTTP config extensionsresolveServiceUrl(defaultUrl, options)— per-call service URL overrideactivities(create, update, createTargeted, updateTargeted, delete, getMembers),members,meetings,reactions,teamsRequestOptions<'serviceUrl'>only (no agenticIdentity)