blob: 5f766cd883e8d70f78b886a84f4368674f341259 [file] [log] [blame]
Matteo Scandolo5461a7c2017-08-08 13:05:24 -07001
2/*
3 * Copyright 2017-present Open Networking Foundation
4
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18
Matteo Scandolofc4b37b2017-02-02 12:18:47 -080019// Generated by typings
20// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/angularjs/angular-cookies.d.ts
21declare module "angular-cookies" {
22 var _: string;
23 export = _;
24}
25
26/**
27 * ngCookies module (angular-cookies.js)
28 */
29declare namespace angular.cookies {
30
31 /**
32 * Cookies options
33 * see https://docs.angularjs.org/api/ngCookies/provider/$cookiesProvider#defaults
34 */
35 interface ICookiesOptions {
36 /**
37 * The cookie will be available only for this path and its sub-paths.
38 * By default, this would be the URL that appears in your base tag.
39 */
40 path?: string;
41 /**
42 * The cookie will be available only for this domain and its sub-domains.
43 * For obvious security reasons the user agent will not accept the cookie if the
44 * current domain is not a sub domain or equals to the requested domain.
45 */
46 domain?: string;
47 /**
48 * String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" or a Date object
49 * indicating the exact date/time this cookie will expire.
50 */
51 expires?: string|Date;
52 /**
53 * The cookie will be available only in secured connection.
54 */
55 secure?: boolean;
56 }
57
58 /**
59 * CookieService
60 * see http://docs.angularjs.org/api/ngCookies.$cookies
61 */
62 interface ICookiesService {
63 [index: string]: any;
64 }
65
66 /**
67 * CookieStoreService
68 * see http://docs.angularjs.org/api/ngCookies.$cookieStore
69 */
70 interface ICookiesService {
71 get(key: string): string;
72 getObject(key: string): any;
73 getObject<T>(key: string): T;
74 getAll(): any;
75 put(key: string, value: string, options?: ICookiesOptions): void;
76 putObject(key: string, value: any, options?: ICookiesOptions): void;
77 remove(key: string, options?: ICookiesOptions): void;
78 }
79
80 /**
81 * CookieStoreService DEPRECATED
82 * see https://code.angularjs.org/1.2.26/docs/api/ngCookies/service/$cookieStore
83 */
84 interface ICookieStoreService {
85 /**
86 * Returns the value of given cookie key
87 * @param key Id to use for lookup
88 */
89 get(key: string): any;
90 /**
91 * Sets a value for given cookie key
92 * @param key Id for the value
93 * @param value Value to be stored
94 */
95 put(key: string, value: any): void;
96 /**
97 * Remove given cookie
98 * @param key Id of the key-value pair to delete
99 */
100 remove(key: string): void;
101 }
102
103}