Secret.Item.create

function create(collection: Secret.Collection, schema: Secret.Schema, attributes: {String: String}, label: String, value: Secret.Value, flags: Secret.ItemCreateFlags, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void {
    // Gjs wrapper for secret_item_create()
}
  

Create a new item in the secret service.

If the flags contains Secret.ItemCreateFlags.replace, then the secret service will search for an item matching the attributes, and update that item instead of creating a new one.

This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. Secret.Service.prototype.prompt will be used to handle any prompts that are required.

collection

a secret collection to create this item in

schema

the schema for the attributes

attributes

attributes for the new item

label

label for the new item

value

secret value for the new item

flags

flags for the creation of the new item

cancellable

optional cancellation object

callback

called when the operation completes