You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- **`CreatedAt` and `UpdatedAt` item metadata:** Items and item overviews now expose attributes with their creation and last edit times.
6
-
- **Resolving secrets in bulk**: With the `client.Secrets().ResolveAll` function, the SDK is now able to resolve multiple secrets at once, improving the performance of the operation.
5
+
- **Support for item states**: You can now fetch an item's state using the SDK. `ItemOverview` exposes one of two states: `Active` or `Archived`.
6
+
- `Active`: An item located inside a vault. (Default)
7
+
- `Archived`: An item that has been moved to the Archive. 1Password doesn't include archived items in search results or suggest them when you fill in apps and browsers. You can keep archived items as long as you'd like.
8
+
- **Filtering listed items by state**: You can now filter the results of the item list function by item state.
7
9
8
-
## IMPROVED
10
+
## FIXED
9
11
10
-
- **Support for new field types:** Items with `Address` and `Date` fields can now be created, retrieved, and edited using the 1Password SDK.
11
-
- **Item sharing for attachments and documents**: Items with files attached now can also be shared using the `client.Items().Shares()` functions.
12
-
- **Adding custom fields in sections automatically**: The SDK now automatically adds custom fields without a section to an empty section within the item, creating it if necessary.
13
-
- **`Tags` in item overviews**: The return type of `Items().ListAll` now also contains the item tags.
14
-
- **Broader item editing capabilities**: You are now able to use the `items.put` function on more items, including those with fields that are not directly editable through the SDK (such as legacy fields, passkeys etc.)
12
+
- **Deleting Archived Items:** The SDK now supports deleting items from the archive.
15
13
16
-
## FIXED
14
+
## ⚠️ BREAKING CHANGES ⚠️
15
+
This release contains breaking changes for two functions in the Go SDK.
16
+
17
+
**Vault listing**
18
+
19
+
* The function name has changed from `ListAll` to `List`. To use this in your code, replace:
* The return type of the item listing function has changed from `*Iterator[ItemOverview]` to `[]ItemOverview`. To use this in your code, replace:
72
+
```go
73
+
for {
74
+
overview, err := overviews.Next()
75
+
if errors.Is(err, onepassword.ErrorIteratorDone) {
76
+
break
77
+
} else if err != nil {
78
+
// error handling
79
+
}
80
+
// using the item overview
81
+
}
82
+
```
83
+
with:
84
+
```go
85
+
for _, overview := range overviews {
86
+
// using the item overview
87
+
}
88
+
```
17
89
18
-
- **Improvements to resolving secret references:**
19
-
- Archived items are no longer used for secret references.
20
-
- When multiple sections match a section query in resolving secret references, the SDK look through the fields in all sections, instead of erroring.
90
+
This does not affect any code that's already deployed, and will not take effect in your codebase until you choose to update to version 0.3.0 or later of the 1Password Go SDK.
0 commit comments