Files
NativeScript/tns-platform-declarations/ios/objc-x86_64/objc!VideoSubscriberAccount.d.ts
Vasil Chimev 3e8d6350b9 feat(platform-declarations): generate typings from iOS 13.0 SDK (#7817)
* feat(platform-declarations): generate typings from iOS 13.0 SDK

* fix(platform-declarations): typings generation script

Delete Material Components typings from `tns-platform-declarations`,
they are part of `tns-core-modules` package.

* refactor(platform-declarations): workaround a TypeScript error

Error:
```
tns-platform-declarations/ios/objc-x86_64/objc!OSLog.d.ts(178,15): error TS2417: Class static side 'typeof OSLogEnumerator' incorrectly extends base class static side 'typeof NSEnumerator'.
  Types of property 'alloc' are incompatible.
    Type '() => OSLogEnumerator' is not assignable to type '<ObjectType>() => NSEnumerator<ObjectType>'.
      Type 'OSLogEnumerator' is not assignable to type 'NSEnumerator<ObjectType>'.
        Types of property 'allObjects' are incompatible.
          Type 'NSArray<NSObject>' is not assignable to type 'NSArray<ObjectType>'.
            Type 'NSObject' is not assignable to type 'ObjectType'.
              'NSObject' is assignable to the constraint of type 'ObjectType', but 'ObjectType' could be instantiated with a different subtype of constraint '{}'.
```

References:
https://github.com/Microsoft/TypeScript/issues/17575
https://stackoverflow.com/questions/52518125/workaround-for-accessing-class-type-arguments-in-static-method-in-typescript

* docs(platform-declarations): note a manual step on generating typings

* chore(platform-declarations): exclude ios-typings-prj from transpilation

* refactor(platform-declarations): delete references to MDC types

```
ios/objc-x86_64/objc!QuartzCore.d.ts:676:36 - error TS2304: Cannot find name 'MDCAnimationTimingFunction'.

676  static mdc_functionWithType(type: MDCAnimationTimingFunction): CAMediaTimingFunction;

ios/objc-x86_64/objc!UIKit.d.ts:7717:54 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7717  static mdc_preferredFontForMaterialTextStyle(style: MDCFontTextStyle): UIFont;

ios/objc-x86_64/objc!UIKit.d.ts:7719:53 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7719  static mdc_standardFontForMaterialTextStyle(style: MDCFontTextStyle): UIFont;

ios/objc-x86_64/objc!UIKit.d.ts:7771:63 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7771  mdc_fontSizedForMaterialTextStyleScaledForDynamicType(style: MDCFontTextStyle, scaled: boolean): UIFont;

ios/objc-x86_64/objc!UIKit.d.ts:7794:64 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7794  static mdc_preferredFontDescriptorForMaterialTextStyle(style: MDCFontTextStyle): UIFontDescriptor;

ios/objc-x86_64/objc!UIKit.d.ts:7796:63 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7796  static mdc_standardFontDescriptorForMaterialTextStyle(style: MDCFontTextStyle): UIFontDescriptor;
```
2019-09-19 22:18:08 +03:00

178 lines
4.2 KiB
TypeScript

declare const enum VSAccountAccessStatus {
NotDetermined = 0,
Restricted = 1,
Denied = 2,
Granted = 3
}
declare class VSAccountManager extends NSObject {
static alloc(): VSAccountManager; // inherited from NSObject
static new(): VSAccountManager; // inherited from NSObject
delegate: VSAccountManagerDelegate;
checkAccessStatusWithOptionsCompletionHandler(options: NSDictionary<string, any>, completionHandler: (p1: VSAccountAccessStatus, p2: NSError) => void): void;
enqueueAccountMetadataRequestCompletionHandler(request: VSAccountMetadataRequest, completionHandler: (p1: VSAccountMetadata, p2: NSError) => void): VSAccountManagerResult;
}
interface VSAccountManagerDelegate extends NSObjectProtocol {
accountManagerDismissViewController(accountManager: VSAccountManager, viewController: UIViewController): void;
accountManagerPresentViewController(accountManager: VSAccountManager, viewController: UIViewController): void;
accountManagerShouldAuthenticateAccountProviderWithIdentifier?(accountManager: VSAccountManager, accountProviderIdentifier: string): boolean;
}
declare var VSAccountManagerDelegate: {
prototype: VSAccountManagerDelegate;
};
declare class VSAccountManagerResult extends NSObject {
static alloc(): VSAccountManagerResult; // inherited from NSObject
static new(): VSAccountManagerResult; // inherited from NSObject
cancel(): void;
}
declare class VSAccountMetadata extends NSObject {
static alloc(): VSAccountMetadata; // inherited from NSObject
static new(): VSAccountMetadata; // inherited from NSObject
readonly SAMLAttributeQueryResponse: string;
readonly accountProviderIdentifier: string;
readonly accountProviderResponse: VSAccountProviderResponse;
readonly authenticationExpirationDate: Date;
readonly verificationData: NSData;
}
declare class VSAccountMetadataRequest extends NSObject {
static alloc(): VSAccountMetadataRequest; // inherited from NSObject
static new(): VSAccountMetadataRequest; // inherited from NSObject
accountProviderAuthenticationToken: string;
attributeNames: NSArray<string>;
channelIdentifier: string;
featuredAccountProviderIdentifiers: NSArray<string>;
forceAuthentication: boolean;
includeAccountProviderIdentifier: boolean;
includeAuthenticationExpirationDate: boolean;
interruptionAllowed: boolean;
localizedVideoTitle: string;
supportedAccountProviderIdentifiers: NSArray<string>;
supportedAuthenticationSchemes: NSArray<string>;
verificationToken: string;
}
declare var VSAccountProviderAuthenticationSchemeAPI: string;
declare var VSAccountProviderAuthenticationSchemeSAML: string;
declare class VSAccountProviderResponse extends NSObject {
static alloc(): VSAccountProviderResponse; // inherited from NSObject
static new(): VSAccountProviderResponse; // inherited from NSObject
readonly authenticationScheme: string;
readonly body: string;
readonly status: string;
}
declare var VSCheckAccessOptionPrompt: string;
declare const enum VSErrorCode {
AccessNotGranted = 0,
UnsupportedProvider = 1,
UserCancelled = 2,
ServiceTemporarilyUnavailable = 3,
ProviderRejected = 4,
InvalidVerificationToken = 5,
Rejected = 6
}
declare var VSErrorDomain: string;
declare var VSErrorInfoKeyAccountProviderResponse: string;
declare var VSErrorInfoKeySAMLResponse: string;
declare var VSErrorInfoKeySAMLResponseStatus: string;
declare var VSErrorInfoKeyUnsupportedProviderIdentifier: string;
declare var VSOpenTVProviderSettingsURLString: string;
declare class VSSubscription extends NSObject {
static alloc(): VSSubscription; // inherited from NSObject
static new(): VSSubscription; // inherited from NSObject
accessLevel: VSSubscriptionAccessLevel;
billingIdentifier: string;
expirationDate: Date;
tierIdentifiers: NSArray<string>;
}
declare const enum VSSubscriptionAccessLevel {
Unknown = 0,
FreeWithAccount = 1,
Paid = 2
}
declare class VSSubscriptionRegistrationCenter extends NSObject {
static alloc(): VSSubscriptionRegistrationCenter; // inherited from NSObject
static defaultSubscriptionRegistrationCenter(): VSSubscriptionRegistrationCenter;
static new(): VSSubscriptionRegistrationCenter; // inherited from NSObject
setCurrentSubscription(currentSubscription: VSSubscription): void;
}