DSMTemplatesManager.h
1 // DSMTemplatesManager.h
2 // DocuSignSDK
3 #import <Foundation/Foundation.h>
4 
5 #import "DSMTemplateCacheState.h"
6 #import "DSMDocumentInsertAtPosition.h"
7 #import "DSMSigningMode.h"
8 #import "DSMTextCustomField.h"
9 
10 @class UIViewController;
11 @class DSMEnvelopeTemplate;
13 @class DSMFolder;
14 @class DSMRecipientDefault;
15 @class DSMEnvelopeDefaults;
16 
20 typedef NS_ENUM(NSUInteger, DSMSearchOptions) {
21  DSMSearchOptionContainsMatch,
22  DSMSearchOptionExactMatch,
23  DSMSearchOptionPrefixMatch,
24  DSMSearchOptionSuffixMatch
25 };
26 
27 @protocol DSMTemplatesManagerDelegate;
28 
34 @interface DSMTemplatesManager : NSObject
35 
41 @property (nonatomic, weak) id<DSMTemplatesManagerDelegate> delegate;
46 - (void)listTemplatesWithCompletion:(void(^)(NSArray<DSMEnvelopeTemplateDefinition *> *envelopeTemplateDefinitions, NSError *error))completionBlock;
52 - (void)listTemplatesWithSearchPredicate: (NSPredicate *)predicate Completion:(void(^)(NSArray<DSMEnvelopeTemplateDefinition *> *envelopeTemplateDefinitions, NSError *error))completionBlock;
58 - (void)listTemplatesWithFolderId:(NSString *)folderId completion:(void(^)(NSArray<DSMEnvelopeTemplateDefinition *> *envelopeTemplateDefinitions, NSError *error))completionBlock;
65 - (void)listTemplatesWithTemplateName:(NSString *)templateName searchOptions:(DSMSearchOptions)options completion:(void(^)(NSArray<DSMEnvelopeTemplateDefinition *> *envelopeTemplateDefinitions, NSError *error))completionBlock;
70 - (void)listTemplateFoldersWithCompletion:(void(^)(NSArray<DSMFolder *> *folders, NSError *error))completionBlock;
77 - (DSMTemplateCacheState)cacheStateOfTemplateWithId:(NSString *)templateId;
84 - (DSMEnvelopeTemplate *)cachedTemplateWithId:(NSString *)templateId includePdfs:(BOOL)includePdfs;
90 - (void)cacheTemplateWithId:(NSString *)templateId completion:(void(^)(NSError *))completionBlock;
95 - (void)removeCachedTemplateWithId:(NSString *)templateId;
99 - (void)removeCachedTemplates;
104 - (NSArray *)cachedTemplates;
109 - (NSArray *)cachedTemplateIds;
114 - (NSUInteger)cachedTemplateCount;
122 - (BOOL)canCacheEnvelopeTemplate:(DSMEnvelopeTemplate *)envelopeTemplate error:(NSError *__autoreleasing*)error;
132 - (void)presentSendTemplateControllerWithTemplateWithId:(NSString *)templateId
133  signingMode:(DSMSigningMode)signingMode
134  presentingController:(UIViewController *)presentingController
135  animated:(BOOL)animated
136  completion:(void(^)(UIViewController *viewController, NSError *error))completion;
151 - (void)presentSendTemplateControllerWithTemplateWithId:(NSString *)templateId
152  envelopeDefaults:(DSMEnvelopeDefaults *)envelopeDefaults
153  pdfToInsert:(NSData *)pdfToInsert
154  insertAtPosition:(DSMDocumentInsertAtPosition)insertAtPosition
155  signingMode:(DSMSigningMode)signingMode
156  presentingController:(UIViewController *)presentingController
157  animated:(BOOL)animated
158  completion:(void(^)(UIViewController *viewController, NSError *error))completion;
159 
160 @end
id< DSMTemplatesManagerDelegate > delegate
The DSMTemplatesManagerDelegate class&#39; delegate object.
Definition: DSMTemplatesManager.h:41
Definition: DSMTemplatesManager.h:34
NSUInteger cachedTemplateCount()
Definition: DSMEnvelopeTemplate.h:15
Definition: DSMRecipientDefault.h:11
NSArray * cachedTemplates()
Definition: DSMEnvelopeTemplateDefinition.h:8
Definition: DSMFolder.h:3
Definition: DSMEnvelopeDefaults.h:11
NSArray * cachedTemplateIds()