UNPKG

6.69 kBTypeScriptView Raw
1/**
2 * Would be used when creating or deleting a DocumentCollection
3 * or a User in Azure Cosmos DB database service
4 * @hidden
5 * Given a database id, this creates a database link.
6 * @param databaseId - The database id
7 * @returns A database link in the format of `dbs/{0}`
8 * with `{0}` being a Uri escaped version of the databaseId
9 */
10export declare function createDatabaseUri(databaseId: string): string;
11/**
12 * Given a database and collection id, this creates a collection link.
13 * Would be used when updating or deleting a DocumentCollection, creating a
14 * Document, a StoredProcedure, a Trigger, a UserDefinedFunction, or when executing a query
15 * with CreateDocumentQuery in Azure Cosmos DB database service.
16 * @param databaseId - The database id
17 * @param collectionId - The collection id
18 * @returns A collection link in the format of `dbs/{0}/colls/{1}`
19 * with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId
20 * @hidden
21 */
22export declare function createDocumentCollectionUri(databaseId: string, collectionId: string): string;
23/**
24 * Given a database and user id, this creates a user link.
25 * Would be used when creating a Permission, or when replacing or deleting
26 * a User in Azure Cosmos DB database service
27 * @param databaseId - The database id
28 * @param userId - The user id
29 * @returns A user link in the format of `dbs/{0}/users/{1}`
30 * with `{0}` being a Uri escaped version of the databaseId and `{1}` being userId
31 * @hidden
32 */
33export declare function createUserUri(databaseId: string, userId: string): string;
34/**
35 * Given a database and collection id, this creates a collection link.
36 * Would be used when creating an Attachment, or when replacing
37 * or deleting a Document in Azure Cosmos DB database service
38 * @param databaseId - The database id
39 * @param collectionId - The collection id
40 * @param documentId - The document id
41 * @returns A document link in the format of
42 * `dbs/{0}/colls/{1}/docs/{2}` with `{0}` being a Uri escaped version of
43 * the databaseId, `{1}` being collectionId and `{2}` being the documentId
44 * @hidden
45 */
46export declare function createDocumentUri(databaseId: string, collectionId: string, documentId: string): string;
47/**
48 * Given a database, collection and document id, this creates a document link.
49 * Would be used when replacing or deleting a Permission in Azure Cosmos DB database service.
50 * @param databaseId -The database Id
51 * @param userId -The user Id
52 * @param permissionId - The permissionId
53 * @returns A permission link in the format of `dbs/{0}/users/{1}/permissions/{2}`
54 * with `{0}` being a Uri escaped version of the databaseId, `{1}` being userId and `{2}` being permissionId
55 * @hidden
56 */
57export declare function createPermissionUri(databaseId: string, userId: string, permissionId: string): string;
58/**
59 * Given a database, collection and stored proc id, this creates a stored proc link.
60 * Would be used when replacing, executing, or deleting a StoredProcedure in
61 * Azure Cosmos DB database service.
62 * @param databaseId -The database Id
63 * @param collectionId -The collection Id
64 * @param storedProcedureId -The stored procedure Id
65 * @returns A stored procedure link in the format of
66 * `dbs/{0}/colls/{1}/sprocs/{2}` with `{0}` being a Uri escaped version of the databaseId,
67 * `{1}` being collectionId and `{2}` being the storedProcedureId
68 * @hidden
69 */
70export declare function createStoredProcedureUri(databaseId: string, collectionId: string, storedProcedureId: string): string;
71/**
72 * Given a database, collection and trigger id, this creates a trigger link.
73 * Would be used when replacing, executing, or deleting a Trigger in Azure Cosmos DB database service
74 * @param databaseId -The database Id
75 * @param collectionId -The collection Id
76 * @param triggerId -The trigger Id
77 * @returns A trigger link in the format of
78 * `dbs/{0}/colls/{1}/triggers/{2}` with `{0}` being a Uri escaped version of the databaseId,
79 * `{1}` being collectionId and `{2}` being the triggerId
80 * @hidden
81 */
82export declare function createTriggerUri(databaseId: string, collectionId: string, triggerId: string): string;
83/**
84 * Given a database, collection and udf id, this creates a udf link.
85 * Would be used when replacing, executing, or deleting a UserDefinedFunction in
86 * Azure Cosmos DB database service
87 * @param databaseId -The database Id
88 * @param collectionId -The collection Id
89 * @param udfId -The User Defined Function Id
90 * @returns A udf link in the format of `dbs/{0}/colls/{1}/udfs/{2}`
91 * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the udfId
92 * @hidden
93 */
94export declare function createUserDefinedFunctionUri(databaseId: string, collectionId: string, udfId: string): string;
95/**
96 * Given a database, collection and conflict id, this creates a conflict link.
97 * Would be used when creating a Conflict in Azure Cosmos DB database service.
98 * @param databaseId -The database Id
99 * @param collectionId -The collection Id
100 * @param conflictId -The conflict Id
101 * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}`
102 * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId
103 * @hidden
104 */
105export declare function createConflictUri(databaseId: string, collectionId: string, conflictId: string): string;
106/**
107 * Given a database, collection and conflict id, this creates a conflict link.
108 * Would be used when creating a Conflict in Azure Cosmos DB database service.
109 * @param databaseId -The database Id
110 * @param collectionId -The collection Id
111 * @param documentId -The document Id
112 * @param attachmentId -The attachment Id
113 * @returns A conflict link in the format of `dbs/{0}/colls/{1}/conflicts/{2}`
114 * with `{0}` being a Uri escaped version of the databaseId, `{1}` being collectionId and `{2}` being the conflictId
115 * @hidden
116 */
117export declare function createAttachmentUri(databaseId: string, collectionId: string, documentId: string, attachmentId: string): string;
118/**
119 * Given a database and collection, this creates a partition key ranges link in
120 * the Azure Cosmos DB database service.
121 * @param databaseId - The database Id
122 * @param collectionId - The collection Id
123 * @returns A partition key ranges link in the format of
124 * `dbs/{0}/colls/{1}/pkranges` with `{0}` being a Uri escaped version of the databaseId and `{1}` being collectionId
125 * @hidden
126 */
127export declare function createPartitionKeyRangesUri(databaseId: string, collectionId: string): string;
128//# sourceMappingURL=uriFactory.d.ts.map
\No newline at end of file