microsoftgraph / msgraph-sdk-python

MIT License
383 stars 56 forks source link

DeltaRequestBuilderGetQueryParameters for messages missing option for changeType #364

Closed jussihi closed 9 months ago

jussihi commented 1 year ago

https://learn.microsoft.com/en-us/graph/delta-query-messages#use-query-parameters-in-a-delta-query-for-messages

quoted: Additionally, to return only certain type of changes (created, updated or deleted) in the delta query's response, you can optionally filter the desired type of change using a custom query option changeType. Possible values are created, updated or deleted.

Regarding my other problems, there doesn't seem to be a way to set the query parameter for delta tracking's "changeType" field. None of this package's DeltaRequestBuilderGetQueryParameters has this field. Or should I create my own class inheriting DeltaRequestBuilderGetQueryParameters and add it there manually?

jussihi commented 12 months ago

This is still not implemented.

query_params = DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters(
    changeType = "created"
)

fails to TypeError: DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters.__init__() got an unexpected keyword argument 'changeType'

it is however clearly documented online: https://learn.microsoft.com/en-us/graph/api/message-delta?view=graph-rest-1.0&tabs=http#query-parameters

jussihi commented 12 months ago

@samwelkanda , @baywet could you please check this? Am I understanding something wrong? I thought that this would get fixed before release 1.0.0, but for some reason it's still not there. :)

baywet commented 12 months ago

@jussihi thanks for the nudge here. This is caused by this metadata issue. https://github.com/microsoftgraph/msgraph-metadata/issues/480

Let me see if I can get it prioritized

jussihi commented 12 months ago

Ah, I see it is some dependency and not tied to the preview-or-not -status of this python library! Thanks for the information. Let's see when we get the feature added!

baywet commented 12 months ago

Update: the fix to metadata was just merged in today, which means the query parameter should show up in the next generation next week. https://github.com/microsoftgraph/msgraph-metadata/pull/500

jussihi commented 12 months ago

Thanks for the heads-up and quick work on this @baywet !

jussihi commented 11 months ago

@baywet , which pip module should I upgrade to see this change? I'm still not able to get it working... 😁

baywet commented 11 months ago

This is because we haven't released a new version since my last message. Please bear with us while we sort through some organizational/staffing aspects in the background. If this is a pressing matter, please open a support ticket and reference this issue.

jussihi commented 11 months ago

Ok @baywet , thanks for the info. No no there is no hurry, I know it might be a challenging time what we are living in :) I was just wondering if I was doing something wrong here at my end. Thanks for the support again, it is very much appreciated!

jussihi commented 10 months ago

Also https://learn.microsoft.com/en-us/graph/api/calendar-list-calendarview?view=graph-rest-1.0&tabs=python#request (CalendarViewRequestBuilderGetQueryParameters) are missing, I get

CalendarViewRequestBuilder.CalendarViewRequestBuilderGetQueryParameters.__init__() got an unexpected keyword argument 'start_date_time'

@baywet , Should I open another issue or is it enough to report this here?

jussihi commented 10 months ago

Also, is there a way to get around this SDK limitation for time being, i.e. can I somehow manually insert these parameters to the request?

I would like to get the calendar view one working, since I need it.

baywet commented 10 months ago

@jussihi This is a different problem (different endpoint/operation) maybe opening a separate issue would have been better here. What version of the SDK are you using? The property/query parameter is present. https://github.com/microsoftgraph/msgraph-sdk-python/blame/c1cf802f3ca7f6dc4c22cc9eea765e72c7f9721a/msgraph/generated/users/item/calendar/calendar_view/calendar_view_request_builder.py#L163

As for the original issue of the missing change type, it is present in the latest version of the SDK https://github.com/microsoftgraph/msgraph-sdk-python/blob/c1cf802f3ca7f6dc4c22cc9eea765e72c7f9721a/msgraph/generated/users/item/mail_folders/item/messages/delta/delta_request_builder.py#L91

baywet commented 10 months ago

Allow to correct the previous statement, it is merged in the main branch, but it seems the package hasn't been published since the original release. https://pypi.org/project/msgraph-sdk/ @samwelkanda is there anything holding weekly releases at this point?

jussihi commented 10 months ago

@baywet thank you again for the quick response. Once there is >1.0.0 version available, I will update my python package and report back about these features! 👍

jussihi commented 9 months ago

This works now! Thank you for support, this issue can be closed :)

@baywet