Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Strong type support for property bag #590

Closed
baywet opened this issue Sep 15, 2017 · 7 comments
Closed

Strong type support for property bag #590

baywet opened this issue Sep 15, 2017 · 7 comments
Milestone

Comments

@baywet
Copy link

baywet commented Sep 15, 2017

Category

[x] Enhancement

[ ] Bug

[ ] Question

Version

Please specify what version of the library you are using: [2.0.8]

Expected / Desired Behavior / Question

It'd be nice to have a class to represent SP.PropertyValues and add a property on the web class for AllProperties
Something we could use like pnp.sp.web.allproperties.get() as a shortcut for #253
Having this on SPFolder as well would be good.
(we already have that for the role assignements for example)
Thanks!

@patrick-rodgers
Copy link
Contributor

We talked through the strong typing in the other issue, let us know if you are still have questions. We have generally been avoiding adding properties to the objects such as AllProperties as you can select it out and each thing we add makes the file size larger (something that also gets mentioned frequently). The difference here in the case of AllProperties is that it is itself selectable (it is a collection) so it would give folks a way to get just the props they want. Let me think about it a little.

@patrick-rodgers patrick-rodgers added this to the 3.0.1 milestone Sep 20, 2017
@patrick-rodgers patrick-rodgers removed this from the 3.0.2 milestone Oct 7, 2017
@ripenko
Copy link

ripenko commented Nov 17, 2017

Hi,

I don't want to create an issue.
How can I add, update, delete property from allproperties?

@patrick-rodgers
Copy link
Contributor

Hi @AlexeyRipenko - you cannot currently manage AllProperties via REST, you would need to use the CSOM libraries. This feature has already been requested (#455) and we can add support once it is available. Thanks!

@baywet
Copy link
Author

baywet commented Nov 27, 2017

Hey Patrick,
You removed the issue from 3.0.2 milestone, the original intent of that post was to get shorthands and type support for the properties.
Is it possible to get it back on? or for 3.0.3?
Thanks!

@patrick-rodgers
Copy link
Contributor

patrick-rodgers commented Nov 27, 2017

[Edited]
I am not sure of the value of creating an interface to list all the possible things that could be in the property bag, or if it would ever be complete. And I am not sure how that would help developers - if you are creating an application you would know which properties you want to read and would create the interface you expect. For example say we create an interface with 50 things all of which are optional and type the return to that interface - but you only care about 2. Now you've got 50 intellisense things, 48 you ignore.

Perhaps I am missing what you are really asking for?

@patrick-rodgers
Copy link
Contributor

Added support for allproperties property on web object in #681. Closing this issue as resolved.

@baywet
Copy link
Author

baywet commented Jan 2, 2018

thanks !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants