@types/parse
Advanced tools
Comparing version 2.2.11 to 2.2.12
@@ -17,2 +17,3 @@ // Type definitions for parse 2.2.9 | ||
// Raschid JF Rafaelly <https://github.com/RaschidJFR> | ||
// Jeff Gu Kang <https://github.com/jeffgukang> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -785,3 +786,138 @@ // TypeScript Version: 2.4 | ||
/** | ||
* A Parse.Schema object is for handling schema data from Parse. | ||
* All the schemas methods require MasterKey. | ||
* | ||
* @param {String} className Parse Class string | ||
* | ||
* https://parseplatform.org/Parse-SDK-JS/api/master/Parse.Schema.html | ||
* | ||
* ``` | ||
* const schema = new Parse.Schema('MyClass'); | ||
* schema.addString('field'); | ||
* schema.addIndex('index_name', { field: 1 }); | ||
* schema.save(); | ||
* ``` | ||
*/ | ||
class Schema { | ||
constructor(className: string) | ||
/** | ||
* Static method to get all schemas | ||
* @param options Valid options are: | ||
* - useMasterKey: In Cloud Code and Node only, causes the Master Key to be used for this request. | ||
* - sessionToken: A valid session token, used for making a request on behalf of a specific user. | ||
*/ | ||
static all(options?: ScopeOptions): Promise<Schema[]> | ||
addArray(name: string): this | ||
addBoolean(name: string): this | ||
addDate(name: string): this | ||
addField(name: string, type?: Schema.TYPE): this | ||
addFile(name: string): this | ||
addGeoPoint(name: string): this | ||
/** | ||
* Adding an Index to Create / Update a Schema | ||
* @param {String} name Name of the field that will be created on Parse | ||
* @param {Schema.Index} index { 'field': value } `field` should exist in the schema before using addIndex. `value` can be a (String|Number|Boolean|Date|Parse.File|Parse.GeoPoint|Array|Object|Pointer|Parse.Relation) | ||
* @return Returns the schema, so you can chain this call. | ||
* @example | ||
* ``` | ||
* schema.addIndex('index_name', {'field': 1}); | ||
* ``` | ||
*/ | ||
addIndex(name: string, index: Schema.Index): this | ||
addNumber(name: string): this | ||
addObject(name: string): this | ||
/** | ||
* Adding Pointer Field | ||
* @param {String} name Name of the field that will be created on Parse | ||
* @param {String} targetClass Name of the target Pointer Class | ||
* @return Returns the schema, so you can chain this call. | ||
*/ | ||
addPointer(name: string, targetClass: string): this | ||
addPolygon(name: string): this | ||
/** | ||
* Adding Relation Field | ||
* @param {String} name Name of the field that will be created on Parse | ||
* @param {String} targetClass Name of the target Pointer Class | ||
* @return Returns the schema, so you can chain this call. | ||
*/ | ||
addRelation(name: string, targetClass: string): this | ||
addString(name: string): this | ||
/** | ||
* Removing a Schema from Parse Can only be used on Schema without objects | ||
* @param options | ||
* Valid options are: | ||
* - useMasterKey: In Cloud Code and Node only, causes the Master Key to be used for this request. | ||
* - sessionToken: A valid session token, used for making a request on behalf of a specific user. | ||
* @returns {Promise} A promise that is resolved with the result when the query completes. | ||
*/ | ||
// @TODO Fix Promise<any> | ||
delete(options?: ScopeOptions): Promise<any> | ||
/** | ||
* Deleting a Field to Update on a Schema | ||
* @param name Name of the field | ||
* @return Returns the schema, so you can chain this call. | ||
*/ | ||
deleteField(name: string): this | ||
/** | ||
* Deleting a Index Field to Update on a Schema | ||
* @param name Name of the index field | ||
* @return Returns the schema, so you can chain this call. | ||
*/ | ||
deleteIndex(name: string): this | ||
/** | ||
* Get the Schema from Parse | ||
*/ | ||
get(options?: ScopeOptions): Promise<Schema> | ||
/** | ||
* Removes all objects from a Schema (class) in Parse. EXERCISE CAUTION, running this will delete all objects for this schema and cannot be reversed | ||
*/ | ||
// TODO Fix Promise<any> | ||
purge(): Promise<any> | ||
/** | ||
* Create a new Schema on Parse | ||
*/ | ||
save(options?: ScopeOptions): Promise<Schema> | ||
/** | ||
* Update a Schema on Parse | ||
*/ | ||
update(options?: ScopeOptions): Promise<Schema> | ||
} | ||
namespace Schema { | ||
type TYPE = | ||
| string | ||
| number | ||
| boolean | ||
| Date | ||
| File | ||
| GeoPoint | ||
| Array<any> | ||
| object | ||
| Pointer | ||
| Relation | ||
interface Index { | ||
[fieldName: string]: TYPE | ||
} | ||
} | ||
namespace Analytics { | ||
@@ -788,0 +924,0 @@ |
{ | ||
"name": "@types/parse", | ||
"version": "2.2.11", | ||
"version": "2.2.12", | ||
"description": "TypeScript definitions for parse", | ||
@@ -75,2 +75,7 @@ "license": "MIT", | ||
"githubUsername": "RaschidJFR" | ||
}, | ||
{ | ||
"name": "Jeff Gu Kang", | ||
"url": "https://github.com/jeffgukang", | ||
"githubUsername": "jeffgukang" | ||
} | ||
@@ -89,4 +94,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "9a8e4941831f0f9a3db2d29fa2fe78afee1e4db341025def36edfaccb2260e68", | ||
"typesPublisherContentHash": "092f370083156a948d8f1513000bf5bd2d0324b6bfbc9dd5f511a2099d46e64b", | ||
"typeScriptVersion": "2.4" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Mon, 07 Oct 2019 23:12:58 GMT | ||
* Last updated: Thu, 10 Oct 2019 20:19:03 GMT | ||
* Dependencies: @types/node | ||
@@ -17,2 +17,2 @@ * Global values: ErrorCode, Parse | ||
# Credits | ||
These definitions were written by Ullisen Media Group <http://ullisenmedia.com>, David Poetzsch-Heffter <https://github.com/dpoetzsch>, Cedric Kemp <https://github.com/jaeggerr>, Flavio Negrão <https://github.com/flavionegrao>, Wes Grimes <https://github.com/wesleygrimes>, Otherwise SAS <https://github.com/owsas>, Andrew Goldis <https://github.com/agoldis>, Alexandre Hétu Rivard <https://github.com/AlexandreHetu>, Diamond Lewis <https://github.com/dplewis>, Jong Eun Lee <https://github.com/yomybaby>, Julien Quere <https://github.com/jlnquere>, Yago Tomé <https://github.com/yagotome>, Thibault MOCELLIN <https://github.com/tybi>, and Raschid JF Rafaelly <https://github.com/RaschidJFR>. | ||
These definitions were written by Ullisen Media Group <http://ullisenmedia.com>, David Poetzsch-Heffter <https://github.com/dpoetzsch>, Cedric Kemp <https://github.com/jaeggerr>, Flavio Negrão <https://github.com/flavionegrao>, Wes Grimes <https://github.com/wesleygrimes>, Otherwise SAS <https://github.com/owsas>, Andrew Goldis <https://github.com/agoldis>, Alexandre Hétu Rivard <https://github.com/AlexandreHetu>, Diamond Lewis <https://github.com/dplewis>, Jong Eun Lee <https://github.com/yomybaby>, Julien Quere <https://github.com/jlnquere>, Yago Tomé <https://github.com/yagotome>, Thibault MOCELLIN <https://github.com/tybi>, Raschid JF Rafaelly <https://github.com/RaschidJFR>, and Jeff Gu Kang <https://github.com/jeffgukang>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53147
1135