Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into nsivertsen

# Conflicts:
#	dist/prismic-javascript.min.js
#	package-lock.json
#	package.json
	src/request.ts removed old code
  • Loading branch information
MarcMcIntosh committed Oct 31, 2019
2 parents 215feab + 85b82e9 commit b97af55
Show file tree
Hide file tree
Showing 25 changed files with 7,964 additions and 4,892 deletions.
3 changes: 2 additions & 1 deletion d.ts/Cookies.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ export interface Cookie {
[key: string]: string;
value: string;
}
declare function parse(str: string, options?: any): Cookie;
declare const _default: {
parse: (str: string, options?: any) => Cookie;
parse: typeof parse;
};
export default _default;
77 changes: 8 additions & 69 deletions d.ts/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,70 +1,9 @@
import { Experiments as PrismicExperiment } from './experiments';
import ResolvedApi, { EXPERIMENT_COOKIE as experimentCookie, PREVIEW_COOKIE as previewCookie } from './ResolvedApi';
import Predicates from './Predicates';
import { Experiments } from './experiments';
import Api, { ApiOptions } from './Api';
import { DefaultClient } from './client';
import PrismicApi, { ApiOptions } from './Api';
import ResolvedApi from './ResolvedApi';
declare namespace Prismic {
const experimentCookie = "io.prismic.experiment";
const previewCookie = "io.prismic.preview";
const Predicates: {
at(fragment: string, value: string | number | Date | (string | number | Date)[]): string;
not(fragment: string, value: string | number | Date | (string | number | Date)[]): string;
missing(fragment: string): string;
has(fragment: string): string;
any(fragment: string, values: (string | number | Date)[]): string;
in(fragment: string, values: string[]): string;
fulltext(fragment: string, value: string): string;
similar(documentId: string, maxResults: number): string;
date: {
before(fragment: string, before: string | number | Date): string;
after(fragment: string, after: string | number | Date): string;
between(fragment: string, before: string | number | Date, after: string | number | Date): string;
dayOfMonth(fragment: string, day: number): string;
dayOfMonthAfter(fragment: string, day: number): string;
dayOfMonthBefore(fragment: string, day: number): string;
dayOfWeek(fragment: string, day: string | number): string;
dayOfWeekAfter(fragment: string, day: string | number): string;
dayOfWeekBefore(fragment: string, day: string | number): string;
month(fragment: string, month: string | number): string;
monthBefore(fragment: string, month: string | number): string;
monthAfter(fragment: string, month: string | number): string;
year(fragment: string, year: number): string;
hour(fragment: string, hour: number): string;
hourBefore(fragment: string, hour: number): string;
hourAfter(fragment: string, hour: number): string;
};
dateBefore: (fragment: string, before: string | number | Date) => string;
dateAfter: (fragment: string, after: string | number | Date) => string;
dateBetween: (fragment: string, before: string | number | Date, after: string | number | Date) => string;
dayOfMonth: (fragment: string, day: number) => string;
dayOfMonthAfter: (fragment: string, day: number) => string;
dayOfMonthBefore: (fragment: string, day: number) => string;
dayOfWeek: (fragment: string, day: string | number) => string;
dayOfWeekAfter: (fragment: string, day: string | number) => string;
dayOfWeekBefore: (fragment: string, day: string | number) => string;
month: (fragment: string, month: string | number) => string;
monthBefore: (fragment: string, month: string | number) => string;
monthAfter: (fragment: string, month: string | number) => string;
year: (fragment: string, year: number) => string;
hour: (fragment: string, hour: number) => string;
hourBefore: (fragment: string, hour: number) => string;
hourAfter: (fragment: string, hour: number) => string;
number: {
gt(fragment: string, value: number): string;
lt(fragment: string, value: number): string;
inRange(fragment: string, before: number, after: number): string;
};
gt: (fragment: string, value: number) => string;
lt: (fragment: string, value: number) => string;
inRange: (fragment: string, before: number, after: number) => string;
near: (fragment: string, latitude: number, longitude: number, radius: number) => string;
geopoint: {
near(fragment: string, latitude: number, longitude: number, radius: number): string;
};
};
const Experiments: typeof PrismicExperiment;
const Api: typeof PrismicApi;
function client(url: string, options?: ApiOptions): DefaultClient;
function getApi(url: string, options?: ApiOptions): Promise<ResolvedApi>;
function api(url: string, options?: ApiOptions): Promise<ResolvedApi>;
}
export = Prismic;
export { experimentCookie, previewCookie, Predicates, Experiments, Api };
export declare function client(url: string, options?: ApiOptions): DefaultClient;
export declare function getApi(url: string, options?: ApiOptions): Promise<ResolvedApi>;
export declare function api(url: string, options?: ApiOptions): Promise<ResolvedApi>;
Loading

0 comments on commit b97af55

Please sign in to comment.