cloudkit-js
Version:
A JS library for managing a CloudKit container
171 lines (170 loc) • 5.98 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorType = exports.FieldType = exports.ComparatorValue = void 0;
var ComparatorValue;
(function (ComparatorValue) {
/**
* The left-hand value is equal to the right-hand value.
*/
ComparatorValue["Equals"] = "EQUALS";
/**
* The left-hand value is not equal to the right-hand value.
*/
ComparatorValue["NotEquals"] = "NOT_EQUALS";
/**
* The left-hand value is less than the right-hand value.
*/
ComparatorValue["LessThan"] = "LESS_THAN";
/**
* The left-hand value is less than or equal to the right-hand value.
*/
ComparatorValue["LessThanOrEquals"] = "LESS_THAN_OR_EQUALS";
/**
* The left-hand value is greater than the right-hand value.
*/
ComparatorValue["GreaterThan"] = "GREATER_THAN";
/**
* The left-hand value is greater than or equal to the right-hand value.
*/
ComparatorValue["GreaterThanOrEquals"] = "GREATER_THAN_OR_EQUALS";
/**
* The left-hand location is within the specified distance of the right-hand location.
*/
ComparatorValue["Near"] = "NEAR";
/**
* The records have text fields that contain all specified tokens.
*/
ComparatorValue["ContainsAllTokens"] = "CONTAINS_ALL_TOKENS";
/**
* The left-hand value is in the right-hand list.
*/
ComparatorValue["In"] = "IN";
/**
* The left-hand value is not in the right-hand list.
*/
ComparatorValue["NotIn"] = "NOT_IN";
/**
* The records with text fields contain any of the specified tokens.
*/
ComparatorValue["ContainsAnyTokens"] = "CONTAINS_ANY_TOKENS";
/**
* The records contain values in a list field.
*/
ComparatorValue["ListContains"] = "LIST_CONTAINS";
/**
* The records don’t contain the specified values in a list field.
*/
ComparatorValue["NotListContains"] = "NOT_LIST_CONTAINS";
/**
* The records don’t contain any of the specified values in a list field.
*/
ComparatorValue["NotListContainsAny"] = "NOT_LIST_CONTAINS_ANY";
/**
* The records with a field that begins with a specified value.
*/
ComparatorValue["BeginsWith"] = "BEGINS_WITH";
/**
* The records with a field that doesn’t begin with a specified value.
*/
ComparatorValue["NotBeginsWith"] = "NOT_BEGINS_WITH";
/**
* The records contain a specified value as the first item in a list field.
*/
ComparatorValue["ListMemberBeginsWith"] = "LIST_MEMBER_BEGINS_WITH";
/**
* The records don’t contain a specified value as the first item in a list field.
*/
ComparatorValue["NotListMemberBeginsWith"] = "NOT_LIST_MEMBER_BEGINS_WITH";
/**
* The records contain all values in a list field.
*/
ComparatorValue["ListContainsAll"] = "LIST_CONTAINS_ALL";
/**
* The records don’t contain all specified values in a list field.
*/
ComparatorValue["NotListContainsAll"] = "NOT_LIST_CONTAINS_ALL";
})(ComparatorValue || (exports.ComparatorValue = ComparatorValue = {}));
var DeleteAction;
(function (DeleteAction) {
/**
* No action when a referenced record is deleted.
*/
DeleteAction["None"] = "NONE";
/**
* Deletes a source record when the target record is deleted.
*/
DeleteAction["DeleteSelf"] = "DELETE_SELF";
/**
* Deletes a target record only after all source records are deleted. Verifies that the target record exists before creating this type of reference. If it doesn’t exist, creating the reference fails.
*/
DeleteAction["Validate"] = "VALIDATE";
})(DeleteAction || (DeleteAction = {}));
var FieldType;
(function (FieldType) {
FieldType["String"] = "String";
FieldType["Int64"] = "Int64";
FieldType["Reference"] = "Reference";
FieldType["Location"] = "Location";
FieldType["Double"] = "Double";
FieldType["DateTime"] = "DateTime";
FieldType["Bytes"] = "Bytes";
})(FieldType || (exports.FieldType = FieldType = {}));
var ErrorType;
(function (ErrorType) {
/**
* You don’t have permission to access the endpoint, record, zone, or database.
*/
ErrorType["AccessDenied"] = "ACCESS_DENIED";
/**
* An atomic batch operation failed.
*/
ErrorType["AtomicError"] = "ATOMIC_ERROR";
/**
* Authentication was rejected.
*/
ErrorType["AuthenticationFailed"] = "AUTHENTICATION_FAILED";
/**
* The request requires authentication but none was provided.
*/
ErrorType["AuthenticationRequired"] = "AUTHENTICATION_REQUIRED";
/**
* The request was not valid.
*/
ErrorType["BadRequest"] = "BAD_REQUEST";
/**
* The recordChangeTag value expired. (Retry the request with the latest tag.)
*/
ErrorType["Conflict"] = "CONFLICT";
/**
* The resource that you attempted to create already exists.
*/
ErrorType["Exists"] = "EXISTS";
/**
* An internal error occurred.
*/
ErrorType["InternalError"] = "INTERNAL_ERROR";
/**
* The resource was not found.
*/
ErrorType["NotFound"] = "NOT_FOUND";
/**
* If accessing the public database, you exceeded the app’s quota. If accessing the private database, you exceeded the user’s iCloud quota.
*/
ErrorType["QuotaExceeded"] = "QUOTA_EXCEEDED";
/**
* The request was throttled. Try the request again later.
*/
ErrorType["Throttled"] = "THROTTLED";
/**
* An internal error occurred. Try the request again.
*/
ErrorType["TryAgainLater"] = "TRY_AGAIN_LATER";
/**
* The request violates a validating reference constraint.
*/
ErrorType["ValidatingReferenceError"] = "VALIDATING_REFERENCE_ERROR";
/**
* The zone specified in the request was not found.
*/
ErrorType["ZoneNotFound"] = "ZONE_NOT_FOUND";
})(ErrorType || (exports.ErrorType = ErrorType = {}));