Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/google-drive-realtime-api

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/google-drive-realtime-api - npm Package Compare versions

Comparing version 0.0.32 to 0.0.33

119

google-drive-realtime-api/index.d.ts

@@ -19,4 +19,5 @@ // Type definitions for Google Realtime API

declare namespace gapi.drive.realtime {
export type CollaborativeObjectType = 'EditableString' | 'Map' | 'List'
type GoogEventHandler = ((evt:ObjectChangedEvent) => void) | ((e:Event) => void) | EventListener;
export type GoogEventHandler = ((evt:ObjectChangedEvent) => void) | ((e:Event) => void) | EventListener;

@@ -69,3 +70,3 @@ // Complete

// Addition: the possible values for standard objects are EditableString, List, and Map.
type:string;
type:CollaborativeObjectType;

@@ -112,5 +113,5 @@ // Adds an event listener to the event target. The same handler can only be added once per the type.

export class CollaborativeMap<V> extends CollaborativeObject {
size:string;
size:number;
static type:string; // equals "Map"
static type:'Map';

@@ -160,3 +161,3 @@ // Removes all entries.

static type:string; // equals "EditableString"
static type:'EditableString';

@@ -193,3 +194,3 @@ // Appends a string to the end of this one.

static type:string; // equals "List"
static type:"List";

@@ -352,5 +353,64 @@ // Returns a copy of the contents of this collaborative list as an array.

export type EventType = 'object_changed' | 'values_set' | 'values_added' | 'values_removed' | 'value_changed' |
'text_inserted' | 'text_deleted' | 'collaborator_joined' | 'collaborator_left' | 'reference_shifted' |
'document_save_state_changed' | 'undo_redo_state_changed' | 'attribute_changed';
export const EventType:{
// A collaborative object has changed. This event wraps a specific event, and bubbles to ancestors.
// Defaults to object_changed.
OBJECT_CHANGED:'object_changed'
// Values in a list are changed in place.
// Defaults to values_set.
VALUES_SET:'values_set',
// New values have been added to the list.
// values_added
VALUES_ADDED:'values_added'
// Values have been removed from the list.
// values_removed
VALUES_REMOVED:'values_removed'
// A map or custom object value has changed. Note this could be a new value or deleted value.
// value_changed
VALUE_CHANGED:'value_changed'
// Text has been inserted into a string.
// text_inserted
TEXT_INSERTED:'text_inserted'
// Text has been removed from a string.
// text_deleted
TEXT_DELETED:'text_deleted'
// A new collaborator joined the document. Listen on the gapi.drive.realtime.Document for these changes.
// collaborator_joined
COLLABORATOR_JOINED:'collaborator_joined'
// A collaborator left the document. Listen on the gapi.drive.realtime.Document for these changes.
// collaborator_left
COLLABORATOR_LEFT:'collaborator_left'
// An index reference changed.
// reference_shifted
REFERENCE_SHIFTED:'reference_shifted'
// The document save state changed. Listen on the gapi.drive.realtime.Document for these changes.
// document_save_state_changed
DOCUMENT_SAVE_STATE_CHANGED:'document_save_state_changed'
// The model canUndo/canRedo state changed. Listen on the gapi.drive.realtime.Model for these changes.
// undo_redo_state_changed
UNDO_REDO_STATE_CHANGED:'undo_redo_state_changed'
// A metadata attribute of the document changed. This is fired on changes to:
// gapi.drive.realtime.Attribute.IS_READ_ONLY
// Listen on the gapi.drive.realtime.Document for these changes.
// attribute_changed
ATTRIBUTE_CHANGED:'attribute_changed'
}
// Complete
// https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.BaseModelEvent
interface BaseModelEvent {
export interface BaseModelEvent {
// Whether this event bubbles.

@@ -382,3 +442,3 @@ bubbles : boolean;

// The type of the event.
type : string;
type : EventType;

@@ -409,2 +469,3 @@ // The user id of the user that initiated this event.

Value must not be null.
isLocal

@@ -428,3 +489,3 @@ boolean

// https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.ObjectChangedEvent
interface ObjectChangedEvent extends BaseModelEvent {
export interface ObjectChangedEvent extends BaseModelEvent {
// parameters as in BaseModelEvent above except for addition of:

@@ -447,3 +508,3 @@ // events:

values:V[], movedFromList:CollaborativeList<V>, movedFromIndex:number):ValuesAddedEvent<V>;
// The index of the first added value

@@ -536,3 +597,3 @@ index:number;

"fatal_network_error" | "unexpected_element";
export var ErrorType : {
export const ErrorType : {
// Another user created the document's initial state after

@@ -641,8 +702,8 @@ // gapi.drive.realtime.load was called but before the local

) : Document;
/* Loads an existing file by id.
https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime#.load
@Param fileId {string} Id of the file to load.
@Param onLoaded {function(non-null gapi.drive.realtime.Document)}

@@ -664,4 +725,18 @@ A callback that will be called when the realtime document is ready. The created or opened realtime document

opt_initializerFn? : (m:Model) => void,
opt_errorFn? : (e:gapi.drive.realtime.Error) => void
opt_errorFn? : (e:Error) => void
):void;
export function loadAppDataDocument(
onLoaded:(x:Document) => void,
opt_initializerFn?:(x:Model) => void,
opt_errorFn?:(e:Error) => void
):void
// Loads an in-memory document from a json string.
// This document does not talk to the server and will only exist in memory for as long as the browser session exists.
export function loadFromJson(
json:string,
opt_errorFn?:(e:Error) => void
):Document
}

@@ -690,13 +765,2 @@

declare namespace gapi.drive.realtime.EventType {
export var TEXT_INSERTED: string
export var TEXT_DELETED: string
export var OBJECT_CHANGED: string
// List
export var VALUES_ADDED:string;
export var VALUES_REMOVED:string;
export var VALUES_SET:string;
}
// rtclient is a global var introduced by realtime-client-utils.js

@@ -708,2 +772,3 @@ declare namespace rtclient {

load():void;
handleErrors(e:gapi.drive.realtime.Error):void;
}

@@ -715,2 +780,4 @@ interface RealtimeLoaderFactory {

// ***********************************
// NOTE THIS IS OUT OF DATE. realtime-client-utils.js has been rewritten, with the new version "Realtime Utils 1.0.0".
// Will add typings for the new version later.
// The remainder of this file types some (not all) things in realtime-client-utils.js, found here:

@@ -717,0 +784,0 @@ // https://developers.google.com/google-apps/realtime/realtime-quickstart

{
"name": "@types/google-drive-realtime-api",
"version": "0.0.32",
"version": "0.0.33",
"description": "TypeScript definitions for Google Realtime API",

@@ -16,3 +16,3 @@ "license": "MIT",

"typings": "index.d.ts",
"typesPublisherContentHash": "3dccaff8912de3ace1b9a13add1af534296804bfc06b926516b4fcaf4f3223c0"
"typesPublisherContentHash": "fa1803b14d9f50477363ee2e1b94aacb196e919541532498b4b103732dca061d"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Wed, 26 Oct 2016 19:23:26 GMT
* Last updated: Tue, 22 Nov 2016 23:38:10 GMT
* File structure: Global

@@ -14,0 +14,0 @@ * Library Dependencies: none

@@ -6,4 +6,4 @@ {

"moduleDependencies": [],
"libraryMajorVersion": "0",
"libraryMinorVersion": "0",
"libraryMajorVersion": 0,
"libraryMinorVersion": 0,
"libraryName": "Google Realtime API",

@@ -24,3 +24,3 @@ "typingsPackageName": "google-drive-realtime-api",

"hasPackageJson": false,
"contentHash": "3dccaff8912de3ace1b9a13add1af534296804bfc06b926516b4fcaf4f3223c0"
"contentHash": "fa1803b14d9f50477363ee2e1b94aacb196e919541532498b4b103732dca061d"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc