@doorstepai/dropoff-sdk-capacitor 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DoorstepaiDropoffSdkCapacitor.podspec +22 -0
- package/LICENSE +20 -0
- package/README.md +401 -0
- package/android/build.gradle +48 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/ai/doorstep/dropoffsdk/capacitor/DoorstepAIDropoffSDKPlugin.kt +291 -0
- package/dist/docs.json +705 -0
- package/dist/esm/definitions.d.ts +115 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +27 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +23 -0
- package/dist/esm/web.js +51 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +87 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +90 -0
- package/dist/plugin.js.map +1 -0
- package/ios/DoorstepDropoffSDK.xcframework/Info.plist +48 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Headers/DoorstepDropoffSDK.h +19 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Headers/RateReducer.h +117 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Info.plist +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.abi.json +5281 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +117 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios.swiftinterface +117 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/Modules/module.modulemap +6 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/PrivacyInfo.xcprivacy +39 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +201 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Info.plist +20 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +2108 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Headers/DoorstepDropoffSDK.h +19 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Headers/RateReducer.h +117 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Info.plist +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +5281 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +117 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +117 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +5281 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +117 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/DoorstepDropoffSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +117 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/Modules/module.modulemap +6 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/PrivacyInfo.xcprivacy +39 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/DoorstepDropoffSDK.framework/_CodeSignature/CodeResources +256 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Info.plist +20 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/DWARF/DoorstepDropoffSDK +0 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/DoorstepDropoffSDK.yml +2108 -0
- package/ios/DoorstepDropoffSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/DoorstepDropoffSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/DoorstepDropoffSDK.yml +2098 -0
- package/ios/Plugin/DoorstepAIDropoffSDKPlugin.m +22 -0
- package/ios/Plugin/DoorstepAIDropoffSDKPlugin.swift +313 -0
- package/package.json +78 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured address used by {@link DoorstepAIDropoffSDKPlugin.startDeliveryByAddress}.
|
|
3
|
+
* Field names mirror the Google Places address-component types.
|
|
4
|
+
*/
|
|
5
|
+
export interface AddressType {
|
|
6
|
+
streetNumber: string;
|
|
7
|
+
route: string;
|
|
8
|
+
/** Apartment / unit / suite. Optional. */
|
|
9
|
+
subPremise?: string;
|
|
10
|
+
locality: string;
|
|
11
|
+
/** State / province (e.g. "CA"). */
|
|
12
|
+
administrativeAreaLevel1: string;
|
|
13
|
+
postalCode: string;
|
|
14
|
+
}
|
|
15
|
+
export interface LatLngObject {
|
|
16
|
+
lat: number;
|
|
17
|
+
lng: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Type of dropoff for {@link DoorstepAIDropoffSDKPlugin.markDropoff}.
|
|
21
|
+
* Maps to the native SDK's `"pod"` / `"non_pod"` strings.
|
|
22
|
+
*/
|
|
23
|
+
export declare type DropoffType = 'pod' | 'non_pod';
|
|
24
|
+
export interface InitOptions {
|
|
25
|
+
/** Android only: title shown in the foreground-service notification. */
|
|
26
|
+
notificationTitle?: string;
|
|
27
|
+
/** Android only: body text shown in the foreground-service notification. */
|
|
28
|
+
notificationText?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SetApiKeyOptions {
|
|
31
|
+
key: string;
|
|
32
|
+
}
|
|
33
|
+
export interface StartDeliveryByPlaceIDOptions {
|
|
34
|
+
placeID: string;
|
|
35
|
+
deliveryId: string;
|
|
36
|
+
timeoutSeconds?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface StartDeliveryByPlusCodeOptions {
|
|
39
|
+
plusCode: string;
|
|
40
|
+
deliveryId: string;
|
|
41
|
+
timeoutSeconds?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface StartDeliveryByAddressOptions {
|
|
44
|
+
address: AddressType;
|
|
45
|
+
deliveryId: string;
|
|
46
|
+
coordinates?: LatLngObject;
|
|
47
|
+
timeoutSeconds?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface StartDeliveryByAddressStringOptions {
|
|
50
|
+
address: string;
|
|
51
|
+
deliveryId: string;
|
|
52
|
+
coordinates?: LatLngObject;
|
|
53
|
+
timeoutSeconds?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface StartDeliveryByLatLngOptions {
|
|
56
|
+
latitude: number;
|
|
57
|
+
longitude: number;
|
|
58
|
+
/** Apartment / unit. Optional, defaults to `""`. */
|
|
59
|
+
subUnit?: string;
|
|
60
|
+
deliveryId: string;
|
|
61
|
+
timeoutSeconds?: number;
|
|
62
|
+
}
|
|
63
|
+
export interface MarkDropoffOptions {
|
|
64
|
+
deliveryId: string;
|
|
65
|
+
dropoffType: DropoffType;
|
|
66
|
+
}
|
|
67
|
+
export interface NewEventOptions {
|
|
68
|
+
eventName: string;
|
|
69
|
+
deliveryId: string;
|
|
70
|
+
}
|
|
71
|
+
export interface StopDeliveryOptions {
|
|
72
|
+
deliveryId: string;
|
|
73
|
+
}
|
|
74
|
+
export declare type PermissionState = 'granted' | 'denied' | 'prompt' | 'prompt-with-rationale';
|
|
75
|
+
export declare type DoorstepPermissionType = 'location' | 'activity';
|
|
76
|
+
export interface PermissionStatus {
|
|
77
|
+
/** Foreground location (when-in-use). Both platforms. */
|
|
78
|
+
location: PermissionState;
|
|
79
|
+
/**
|
|
80
|
+
* Activity recognition / motion.
|
|
81
|
+
* Android: `ACTIVITY_RECOGNITION`. iOS: `NSMotionUsageDescription`.
|
|
82
|
+
*/
|
|
83
|
+
activity: PermissionState;
|
|
84
|
+
}
|
|
85
|
+
export interface PermissionRequestOptions {
|
|
86
|
+
/** If omitted, requests all permissions. */
|
|
87
|
+
permissions?: DoorstepPermissionType[];
|
|
88
|
+
}
|
|
89
|
+
export interface DoorstepAIDropoffSDKPlugin {
|
|
90
|
+
/**
|
|
91
|
+
* Android-only: initialize the foreground service and notification.
|
|
92
|
+
* No-op on iOS. Safe to call multiple times. Call once at app startup
|
|
93
|
+
* before any other method.
|
|
94
|
+
*/
|
|
95
|
+
init(options?: InitOptions): Promise<void>;
|
|
96
|
+
/** Set the API key. Call once after {@link init}. */
|
|
97
|
+
setApiKey(options: SetApiKeyOptions): Promise<void>;
|
|
98
|
+
startDeliveryByPlaceID(options: StartDeliveryByPlaceIDOptions): Promise<void>;
|
|
99
|
+
startDeliveryByPlusCode(options: StartDeliveryByPlusCodeOptions): Promise<void>;
|
|
100
|
+
/** Alias for {@link startDeliveryByAddressType} — kept for parity with the Flutter SDK. */
|
|
101
|
+
startDeliveryByAddress(options: StartDeliveryByAddressOptions): Promise<void>;
|
|
102
|
+
startDeliveryByAddressType(options: StartDeliveryByAddressOptions): Promise<void>;
|
|
103
|
+
startDeliveryByAddressString(options: StartDeliveryByAddressStringOptions): Promise<void>;
|
|
104
|
+
startDeliveryByLatLng(options: StartDeliveryByLatLngOptions): Promise<void>;
|
|
105
|
+
markDropoff(options: MarkDropoffOptions): Promise<void>;
|
|
106
|
+
newEvent(options: NewEventOptions): Promise<void>;
|
|
107
|
+
stopDelivery(options: StopDeliveryOptions): Promise<void>;
|
|
108
|
+
/** Returns the current grant state for each permission the SDK uses. */
|
|
109
|
+
checkPermissions(): Promise<PermissionStatus>;
|
|
110
|
+
/**
|
|
111
|
+
* Requests the specified permissions (or all if `permissions` is omitted)
|
|
112
|
+
* and resolves with the resulting state for each.
|
|
113
|
+
*/
|
|
114
|
+
requestPermissions(options?: PermissionRequestOptions): Promise<PermissionStatus>;
|
|
115
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Capacitor, registerPlugin } from '@capacitor/core';
|
|
2
|
+
const native = registerPlugin('DoorstepAIDropoffSDK', {
|
|
3
|
+
web: () => import('./web').then(m => new m.DoorstepAIDropoffSDKWeb()),
|
|
4
|
+
});
|
|
5
|
+
// Mirrors the Flutter SDK: `init` is a no-op on iOS (the foreground-service
|
|
6
|
+
// setup it performs is Android-only). Skipping the bridge call on iOS saves
|
|
7
|
+
// a round-trip and matches the Dart implementation exactly.
|
|
8
|
+
//
|
|
9
|
+
// `registerPlugin` returns a Proxy that dispatches calls dynamically; spreading
|
|
10
|
+
// it would drop every method, so we wrap with our own Proxy that overrides
|
|
11
|
+
// only `init` and delegates the rest.
|
|
12
|
+
const DoorstepAIDropoffSDK = new Proxy(native, {
|
|
13
|
+
get(target, prop, receiver) {
|
|
14
|
+
if (prop === 'init') {
|
|
15
|
+
return (options) => {
|
|
16
|
+
if (Capacitor.getPlatform() !== 'android') {
|
|
17
|
+
return Promise.resolve();
|
|
18
|
+
}
|
|
19
|
+
return target.init(options);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return Reflect.get(target, prop, receiver);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
export * from './definitions';
|
|
26
|
+
export { DoorstepAIDropoffSDK };
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAI5D,MAAM,MAAM,GAAG,cAAc,CAC3B,sBAAsB,EACtB;IACE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,uBAAuB,EAAE,CAAC;CACtE,CACF,CAAC;AAEF,4EAA4E;AAC5E,4EAA4E;AAC5E,4DAA4D;AAC5D,EAAE;AACF,gFAAgF;AAChF,2EAA2E;AAC3E,sCAAsC;AACtC,MAAM,oBAAoB,GAA+B,IAAI,KAAK,CAAC,MAAM,EAAE;IACzE,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;QACxB,IAAI,IAAI,KAAK,MAAM,EAAE;YACnB,OAAO,CAAC,OAAqB,EAAiB,EAAE;gBAC9C,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE;oBACzC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;iBAC1B;gBACD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC9B,CAAC,CAAC;SACH;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;CACF,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
import type { DoorstepAIDropoffSDKPlugin, InitOptions, MarkDropoffOptions, NewEventOptions, PermissionRequestOptions, PermissionStatus, SetApiKeyOptions, StartDeliveryByAddressOptions, StartDeliveryByAddressStringOptions, StartDeliveryByLatLngOptions, StartDeliveryByPlaceIDOptions, StartDeliveryByPlusCodeOptions, StopDeliveryOptions } from './definitions';
|
|
3
|
+
/**
|
|
4
|
+
* Web stub. The Dropoff SDK is native-only — every call rejects with
|
|
5
|
+
* `UNIMPLEMENTED` so failures surface immediately on the web platform
|
|
6
|
+
* instead of silently no-op'ing.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DoorstepAIDropoffSDKWeb extends WebPlugin implements DoorstepAIDropoffSDKPlugin {
|
|
9
|
+
private unsupported;
|
|
10
|
+
init(_options?: InitOptions): Promise<void>;
|
|
11
|
+
setApiKey(_options: SetApiKeyOptions): Promise<void>;
|
|
12
|
+
startDeliveryByPlaceID(_options: StartDeliveryByPlaceIDOptions): Promise<void>;
|
|
13
|
+
startDeliveryByPlusCode(_options: StartDeliveryByPlusCodeOptions): Promise<void>;
|
|
14
|
+
startDeliveryByAddress(_options: StartDeliveryByAddressOptions): Promise<void>;
|
|
15
|
+
startDeliveryByAddressType(_options: StartDeliveryByAddressOptions): Promise<void>;
|
|
16
|
+
startDeliveryByAddressString(_options: StartDeliveryByAddressStringOptions): Promise<void>;
|
|
17
|
+
startDeliveryByLatLng(_options: StartDeliveryByLatLngOptions): Promise<void>;
|
|
18
|
+
markDropoff(_options: MarkDropoffOptions): Promise<void>;
|
|
19
|
+
newEvent(_options: NewEventOptions): Promise<void>;
|
|
20
|
+
stopDelivery(_options: StopDeliveryOptions): Promise<void>;
|
|
21
|
+
checkPermissions(): Promise<PermissionStatus>;
|
|
22
|
+
requestPermissions(_options?: PermissionRequestOptions): Promise<PermissionStatus>;
|
|
23
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
/**
|
|
3
|
+
* Web stub. The Dropoff SDK is native-only — every call rejects with
|
|
4
|
+
* `UNIMPLEMENTED` so failures surface immediately on the web platform
|
|
5
|
+
* instead of silently no-op'ing.
|
|
6
|
+
*/
|
|
7
|
+
export class DoorstepAIDropoffSDKWeb extends WebPlugin {
|
|
8
|
+
unsupported(method) {
|
|
9
|
+
return Promise.reject(this.unavailable(`DoorstepAIDropoffSDK.${method} is not available on the web platform.`));
|
|
10
|
+
}
|
|
11
|
+
init(_options) {
|
|
12
|
+
return this.unsupported('init');
|
|
13
|
+
}
|
|
14
|
+
setApiKey(_options) {
|
|
15
|
+
return this.unsupported('setApiKey');
|
|
16
|
+
}
|
|
17
|
+
startDeliveryByPlaceID(_options) {
|
|
18
|
+
return this.unsupported('startDeliveryByPlaceID');
|
|
19
|
+
}
|
|
20
|
+
startDeliveryByPlusCode(_options) {
|
|
21
|
+
return this.unsupported('startDeliveryByPlusCode');
|
|
22
|
+
}
|
|
23
|
+
startDeliveryByAddress(_options) {
|
|
24
|
+
return this.unsupported('startDeliveryByAddress');
|
|
25
|
+
}
|
|
26
|
+
startDeliveryByAddressType(_options) {
|
|
27
|
+
return this.unsupported('startDeliveryByAddressType');
|
|
28
|
+
}
|
|
29
|
+
startDeliveryByAddressString(_options) {
|
|
30
|
+
return this.unsupported('startDeliveryByAddressString');
|
|
31
|
+
}
|
|
32
|
+
startDeliveryByLatLng(_options) {
|
|
33
|
+
return this.unsupported('startDeliveryByLatLng');
|
|
34
|
+
}
|
|
35
|
+
markDropoff(_options) {
|
|
36
|
+
return this.unsupported('markDropoff');
|
|
37
|
+
}
|
|
38
|
+
newEvent(_options) {
|
|
39
|
+
return this.unsupported('newEvent');
|
|
40
|
+
}
|
|
41
|
+
stopDelivery(_options) {
|
|
42
|
+
return this.unsupported('stopDelivery');
|
|
43
|
+
}
|
|
44
|
+
checkPermissions() {
|
|
45
|
+
return this.unsupported('checkPermissions');
|
|
46
|
+
}
|
|
47
|
+
requestPermissions(_options) {
|
|
48
|
+
return this.unsupported('requestPermissions');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[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AAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAC1C,CAAC;IACD,gBAAgB;QACd,OAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IAC9C,CAAC;IACD,kBAAkB,CAAC,QAAmC;QACpD,OAAO,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@capacitor/core');
|
|
6
|
+
|
|
7
|
+
const native = core.registerPlugin('DoorstepAIDropoffSDK', {
|
|
8
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.DoorstepAIDropoffSDKWeb()),
|
|
9
|
+
});
|
|
10
|
+
// Mirrors the Flutter SDK: `init` is a no-op on iOS (the foreground-service
|
|
11
|
+
// setup it performs is Android-only). Skipping the bridge call on iOS saves
|
|
12
|
+
// a round-trip and matches the Dart implementation exactly.
|
|
13
|
+
//
|
|
14
|
+
// `registerPlugin` returns a Proxy that dispatches calls dynamically; spreading
|
|
15
|
+
// it would drop every method, so we wrap with our own Proxy that overrides
|
|
16
|
+
// only `init` and delegates the rest.
|
|
17
|
+
const DoorstepAIDropoffSDK = new Proxy(native, {
|
|
18
|
+
get(target, prop, receiver) {
|
|
19
|
+
if (prop === 'init') {
|
|
20
|
+
return (options) => {
|
|
21
|
+
if (core.Capacitor.getPlatform() !== 'android') {
|
|
22
|
+
return Promise.resolve();
|
|
23
|
+
}
|
|
24
|
+
return target.init(options);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return Reflect.get(target, prop, receiver);
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Web stub. The Dropoff SDK is native-only — every call rejects with
|
|
33
|
+
* `UNIMPLEMENTED` so failures surface immediately on the web platform
|
|
34
|
+
* instead of silently no-op'ing.
|
|
35
|
+
*/
|
|
36
|
+
class DoorstepAIDropoffSDKWeb extends core.WebPlugin {
|
|
37
|
+
unsupported(method) {
|
|
38
|
+
return Promise.reject(this.unavailable(`DoorstepAIDropoffSDK.${method} is not available on the web platform.`));
|
|
39
|
+
}
|
|
40
|
+
init(_options) {
|
|
41
|
+
return this.unsupported('init');
|
|
42
|
+
}
|
|
43
|
+
setApiKey(_options) {
|
|
44
|
+
return this.unsupported('setApiKey');
|
|
45
|
+
}
|
|
46
|
+
startDeliveryByPlaceID(_options) {
|
|
47
|
+
return this.unsupported('startDeliveryByPlaceID');
|
|
48
|
+
}
|
|
49
|
+
startDeliveryByPlusCode(_options) {
|
|
50
|
+
return this.unsupported('startDeliveryByPlusCode');
|
|
51
|
+
}
|
|
52
|
+
startDeliveryByAddress(_options) {
|
|
53
|
+
return this.unsupported('startDeliveryByAddress');
|
|
54
|
+
}
|
|
55
|
+
startDeliveryByAddressType(_options) {
|
|
56
|
+
return this.unsupported('startDeliveryByAddressType');
|
|
57
|
+
}
|
|
58
|
+
startDeliveryByAddressString(_options) {
|
|
59
|
+
return this.unsupported('startDeliveryByAddressString');
|
|
60
|
+
}
|
|
61
|
+
startDeliveryByLatLng(_options) {
|
|
62
|
+
return this.unsupported('startDeliveryByLatLng');
|
|
63
|
+
}
|
|
64
|
+
markDropoff(_options) {
|
|
65
|
+
return this.unsupported('markDropoff');
|
|
66
|
+
}
|
|
67
|
+
newEvent(_options) {
|
|
68
|
+
return this.unsupported('newEvent');
|
|
69
|
+
}
|
|
70
|
+
stopDelivery(_options) {
|
|
71
|
+
return this.unsupported('stopDelivery');
|
|
72
|
+
}
|
|
73
|
+
checkPermissions() {
|
|
74
|
+
return this.unsupported('checkPermissions');
|
|
75
|
+
}
|
|
76
|
+
requestPermissions(_options) {
|
|
77
|
+
return this.unsupported('requestPermissions');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
82
|
+
__proto__: null,
|
|
83
|
+
DoorstepAIDropoffSDKWeb: DoorstepAIDropoffSDKWeb
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
exports.DoorstepAIDropoffSDK = DoorstepAIDropoffSDK;
|
|
87
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { Capacitor, registerPlugin } from '@capacitor/core';\nconst native = registerPlugin('DoorstepAIDropoffSDK', {\n web: () => import('./web').then(m => new m.DoorstepAIDropoffSDKWeb()),\n});\n// Mirrors the Flutter SDK: `init` is a no-op on iOS (the foreground-service\n// setup it performs is Android-only). Skipping the bridge call on iOS saves\n// a round-trip and matches the Dart implementation exactly.\n//\n// `registerPlugin` returns a Proxy that dispatches calls dynamically; spreading\n// it would drop every method, so we wrap with our own Proxy that overrides\n// only `init` and delegates the rest.\nconst DoorstepAIDropoffSDK = new Proxy(native, {\n get(target, prop, receiver) {\n if (prop === 'init') {\n return (options) => {\n if (Capacitor.getPlatform() !== 'android') {\n return Promise.resolve();\n }\n return target.init(options);\n };\n }\n return Reflect.get(target, prop, receiver);\n },\n});\nexport * from './definitions';\nexport { DoorstepAIDropoffSDK };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web stub. The Dropoff SDK is native-only — every call rejects with\n * `UNIMPLEMENTED` so failures surface immediately on the web platform\n * instead of silently no-op'ing.\n */\nexport class DoorstepAIDropoffSDKWeb extends WebPlugin {\n unsupported(method) {\n return Promise.reject(this.unavailable(`DoorstepAIDropoffSDK.${method} is not available on the web platform.`));\n }\n init(_options) {\n return this.unsupported('init');\n }\n setApiKey(_options) {\n return this.unsupported('setApiKey');\n }\n startDeliveryByPlaceID(_options) {\n return this.unsupported('startDeliveryByPlaceID');\n }\n startDeliveryByPlusCode(_options) {\n return this.unsupported('startDeliveryByPlusCode');\n }\n startDeliveryByAddress(_options) {\n return this.unsupported('startDeliveryByAddress');\n }\n startDeliveryByAddressType(_options) {\n return this.unsupported('startDeliveryByAddressType');\n }\n startDeliveryByAddressString(_options) {\n return this.unsupported('startDeliveryByAddressString');\n }\n startDeliveryByLatLng(_options) {\n return this.unsupported('startDeliveryByLatLng');\n }\n markDropoff(_options) {\n return this.unsupported('markDropoff');\n }\n newEvent(_options) {\n return this.unsupported('newEvent');\n }\n stopDelivery(_options) {\n return this.unsupported('stopDelivery');\n }\n checkPermissions() {\n return this.unsupported('checkPermissions');\n }\n requestPermissions(_options) {\n return this.unsupported('requestPermissions');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","Capacitor","WebPlugin"],"mappings":";;;;;;AACA,MAAM,MAAM,GAAGA,mBAAc,CAAC,sBAAsB,EAAE;AACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,uBAAuB,EAAE,CAAC;AACzE,CAAC,CAAC,CAAC;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,oBAAoB,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;AAC/C,IAAI,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;AAChC,QAAQ,IAAI,IAAI,KAAK,MAAM,EAAE;AAC7B,YAAY,OAAO,CAAC,OAAO,KAAK;AAChC,gBAAgB,IAAIC,cAAS,CAAC,WAAW,EAAE,KAAK,SAAS,EAAE;AAC3D,oBAAoB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC7C,iBAAiB;AACjB,gBAAgB,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC5C,aAAa,CAAC;AACd,SAAS;AACT,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AACnD,KAAK;AACL,CAAC;;ACtBD;AACA;AACA;AACA;AAC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AC/C,KAAK;AACL,IAAI,QAAQ,CAAC,QAAQ,EAAE;AACvB,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAC5C,KAAK;AACL,IAAI,YAAY,CAAC,QAAQ,EAAE;AAC3B,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;AAChD,KAAK;AACL,IAAI,gBAAgB,GAAG;AACvB,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;AACpD,KAAK;AACL,IAAI,kBAAkB,CAAC,QAAQ,EAAE;AACjC,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;AACtD,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
var capacitorDoorstepAIDropoffSDK = (function (exports, core) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const native = core.registerPlugin('DoorstepAIDropoffSDK', {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.DoorstepAIDropoffSDKWeb()),
|
|
6
|
+
});
|
|
7
|
+
// Mirrors the Flutter SDK: `init` is a no-op on iOS (the foreground-service
|
|
8
|
+
// setup it performs is Android-only). Skipping the bridge call on iOS saves
|
|
9
|
+
// a round-trip and matches the Dart implementation exactly.
|
|
10
|
+
//
|
|
11
|
+
// `registerPlugin` returns a Proxy that dispatches calls dynamically; spreading
|
|
12
|
+
// it would drop every method, so we wrap with our own Proxy that overrides
|
|
13
|
+
// only `init` and delegates the rest.
|
|
14
|
+
const DoorstepAIDropoffSDK = new Proxy(native, {
|
|
15
|
+
get(target, prop, receiver) {
|
|
16
|
+
if (prop === 'init') {
|
|
17
|
+
return (options) => {
|
|
18
|
+
if (core.Capacitor.getPlatform() !== 'android') {
|
|
19
|
+
return Promise.resolve();
|
|
20
|
+
}
|
|
21
|
+
return target.init(options);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return Reflect.get(target, prop, receiver);
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Web stub. The Dropoff SDK is native-only — every call rejects with
|
|
30
|
+
* `UNIMPLEMENTED` so failures surface immediately on the web platform
|
|
31
|
+
* instead of silently no-op'ing.
|
|
32
|
+
*/
|
|
33
|
+
class DoorstepAIDropoffSDKWeb extends core.WebPlugin {
|
|
34
|
+
unsupported(method) {
|
|
35
|
+
return Promise.reject(this.unavailable(`DoorstepAIDropoffSDK.${method} is not available on the web platform.`));
|
|
36
|
+
}
|
|
37
|
+
init(_options) {
|
|
38
|
+
return this.unsupported('init');
|
|
39
|
+
}
|
|
40
|
+
setApiKey(_options) {
|
|
41
|
+
return this.unsupported('setApiKey');
|
|
42
|
+
}
|
|
43
|
+
startDeliveryByPlaceID(_options) {
|
|
44
|
+
return this.unsupported('startDeliveryByPlaceID');
|
|
45
|
+
}
|
|
46
|
+
startDeliveryByPlusCode(_options) {
|
|
47
|
+
return this.unsupported('startDeliveryByPlusCode');
|
|
48
|
+
}
|
|
49
|
+
startDeliveryByAddress(_options) {
|
|
50
|
+
return this.unsupported('startDeliveryByAddress');
|
|
51
|
+
}
|
|
52
|
+
startDeliveryByAddressType(_options) {
|
|
53
|
+
return this.unsupported('startDeliveryByAddressType');
|
|
54
|
+
}
|
|
55
|
+
startDeliveryByAddressString(_options) {
|
|
56
|
+
return this.unsupported('startDeliveryByAddressString');
|
|
57
|
+
}
|
|
58
|
+
startDeliveryByLatLng(_options) {
|
|
59
|
+
return this.unsupported('startDeliveryByLatLng');
|
|
60
|
+
}
|
|
61
|
+
markDropoff(_options) {
|
|
62
|
+
return this.unsupported('markDropoff');
|
|
63
|
+
}
|
|
64
|
+
newEvent(_options) {
|
|
65
|
+
return this.unsupported('newEvent');
|
|
66
|
+
}
|
|
67
|
+
stopDelivery(_options) {
|
|
68
|
+
return this.unsupported('stopDelivery');
|
|
69
|
+
}
|
|
70
|
+
checkPermissions() {
|
|
71
|
+
return this.unsupported('checkPermissions');
|
|
72
|
+
}
|
|
73
|
+
requestPermissions(_options) {
|
|
74
|
+
return this.unsupported('requestPermissions');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
79
|
+
__proto__: null,
|
|
80
|
+
DoorstepAIDropoffSDKWeb: DoorstepAIDropoffSDKWeb
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
exports.DoorstepAIDropoffSDK = DoorstepAIDropoffSDK;
|
|
84
|
+
|
|
85
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
86
|
+
|
|
87
|
+
return exports;
|
|
88
|
+
|
|
89
|
+
})({}, capacitorExports);
|
|
90
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { Capacitor, registerPlugin } from '@capacitor/core';\nconst native = registerPlugin('DoorstepAIDropoffSDK', {\n web: () => import('./web').then(m => new m.DoorstepAIDropoffSDKWeb()),\n});\n// Mirrors the Flutter SDK: `init` is a no-op on iOS (the foreground-service\n// setup it performs is Android-only). Skipping the bridge call on iOS saves\n// a round-trip and matches the Dart implementation exactly.\n//\n// `registerPlugin` returns a Proxy that dispatches calls dynamically; spreading\n// it would drop every method, so we wrap with our own Proxy that overrides\n// only `init` and delegates the rest.\nconst DoorstepAIDropoffSDK = new Proxy(native, {\n get(target, prop, receiver) {\n if (prop === 'init') {\n return (options) => {\n if (Capacitor.getPlatform() !== 'android') {\n return Promise.resolve();\n }\n return target.init(options);\n };\n }\n return Reflect.get(target, prop, receiver);\n },\n});\nexport * from './definitions';\nexport { DoorstepAIDropoffSDK };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web stub. The Dropoff SDK is native-only — every call rejects with\n * `UNIMPLEMENTED` so failures surface immediately on the web platform\n * instead of silently no-op'ing.\n */\nexport class DoorstepAIDropoffSDKWeb extends WebPlugin {\n unsupported(method) {\n return Promise.reject(this.unavailable(`DoorstepAIDropoffSDK.${method} is not available on the web platform.`));\n }\n init(_options) {\n return this.unsupported('init');\n }\n setApiKey(_options) {\n return this.unsupported('setApiKey');\n }\n startDeliveryByPlaceID(_options) {\n return this.unsupported('startDeliveryByPlaceID');\n }\n startDeliveryByPlusCode(_options) {\n return this.unsupported('startDeliveryByPlusCode');\n }\n startDeliveryByAddress(_options) {\n return this.unsupported('startDeliveryByAddress');\n }\n startDeliveryByAddressType(_options) {\n return this.unsupported('startDeliveryByAddressType');\n }\n startDeliveryByAddressString(_options) {\n return this.unsupported('startDeliveryByAddressString');\n }\n startDeliveryByLatLng(_options) {\n return this.unsupported('startDeliveryByLatLng');\n }\n markDropoff(_options) {\n return this.unsupported('markDropoff');\n }\n newEvent(_options) {\n return this.unsupported('newEvent');\n }\n stopDelivery(_options) {\n return this.unsupported('stopDelivery');\n }\n checkPermissions() {\n return this.unsupported('checkPermissions');\n }\n requestPermissions(_options) {\n return this.unsupported('requestPermissions');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","Capacitor","WebPlugin"],"mappings":";;;IACA,MAAM,MAAM,GAAGA,mBAAc,CAAC,sBAAsB,EAAE;IACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,uBAAuB,EAAE,CAAC;IACzE,CAAC,CAAC,CAAC;IACH;IACA;IACA;IACA;IACA;IACA;IACA;AACK,UAAC,oBAAoB,GAAG,IAAI,KAAK,CAAC,MAAM,EAAE;IAC/C,IAAI,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;IAChC,QAAQ,IAAI,IAAI,KAAK,MAAM,EAAE;IAC7B,YAAY,OAAO,CAAC,OAAO,KAAK;IAChC,gBAAgB,IAAIC,cAAS,CAAC,WAAW,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BAA4B,CAAC,QAAQ,EAAE;IAC3C,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,8BAA8B,CAAC,CAAC;IAChE,KAAK;IACL,IAAI,qBAAqB,CAAC,QAAQ,EAAE;IACpC,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;IACzD,KAAK;IACL,IAAI,WAAW,CAAC,QAAQ,EAAE;IAC1B,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;IAC/C,KAAK;IACL,IAAI,QAAQ,CAAC,QAAQ,EAAE;IACvB,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5C,KAAK;IACL,IAAI,YAAY,CAAC,QAAQ,EAAE;IAC3B,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAChD,KAAK;IACL,IAAI,gBAAgB,GAAG;IACvB,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACpD,KAAK;IACL,IAAI,kBAAkB,CAAC,QAAQ,EAAE;IACjC,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IACtD,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>AvailableLibraries</key>
|
|
6
|
+
<array>
|
|
7
|
+
<dict>
|
|
8
|
+
<key>BinaryPath</key>
|
|
9
|
+
<string>DoorstepDropoffSDK.framework/DoorstepDropoffSDK</string>
|
|
10
|
+
<key>DebugSymbolsPath</key>
|
|
11
|
+
<string>dSYMs</string>
|
|
12
|
+
<key>LibraryIdentifier</key>
|
|
13
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
14
|
+
<key>LibraryPath</key>
|
|
15
|
+
<string>DoorstepDropoffSDK.framework</string>
|
|
16
|
+
<key>SupportedArchitectures</key>
|
|
17
|
+
<array>
|
|
18
|
+
<string>arm64</string>
|
|
19
|
+
<string>x86_64</string>
|
|
20
|
+
</array>
|
|
21
|
+
<key>SupportedPlatform</key>
|
|
22
|
+
<string>ios</string>
|
|
23
|
+
<key>SupportedPlatformVariant</key>
|
|
24
|
+
<string>simulator</string>
|
|
25
|
+
</dict>
|
|
26
|
+
<dict>
|
|
27
|
+
<key>BinaryPath</key>
|
|
28
|
+
<string>DoorstepDropoffSDK.framework/DoorstepDropoffSDK</string>
|
|
29
|
+
<key>DebugSymbolsPath</key>
|
|
30
|
+
<string>dSYMs</string>
|
|
31
|
+
<key>LibraryIdentifier</key>
|
|
32
|
+
<string>ios-arm64</string>
|
|
33
|
+
<key>LibraryPath</key>
|
|
34
|
+
<string>DoorstepDropoffSDK.framework</string>
|
|
35
|
+
<key>SupportedArchitectures</key>
|
|
36
|
+
<array>
|
|
37
|
+
<string>arm64</string>
|
|
38
|
+
</array>
|
|
39
|
+
<key>SupportedPlatform</key>
|
|
40
|
+
<string>ios</string>
|
|
41
|
+
</dict>
|
|
42
|
+
</array>
|
|
43
|
+
<key>CFBundlePackageType</key>
|
|
44
|
+
<string>XFWK</string>
|
|
45
|
+
<key>XCFrameworkFormatVersion</key>
|
|
46
|
+
<string>1.0</string>
|
|
47
|
+
</dict>
|
|
48
|
+
</plist>
|
package/ios/DoorstepDropoffSDK.xcframework/ios-arm64/DoorstepDropoffSDK.framework/DoorstepDropoffSDK
ADDED
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// DoorstepDropoffSDK.h
|
|
3
|
+
// DoorstepDropoffSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Sheel Patel on 5/1/25.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
//! Project version number for DoorstepDropoffSDK.
|
|
11
|
+
FOUNDATION_EXPORT double DoorstepDropoffSDKVersionNumber;
|
|
12
|
+
|
|
13
|
+
//! Project version string for DoorstepDropoffSDK.
|
|
14
|
+
FOUNDATION_EXPORT const unsigned char DoorstepDropoffSDKVersionString[];
|
|
15
|
+
|
|
16
|
+
// In this header, you should import all the public headers of your framework using statements like #import <DoorstepDropoffSDK/PublicHeader.h>
|
|
17
|
+
#import <DoorstepDropoffSDK/RateReducer.h>
|
|
18
|
+
|
|
19
|
+
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file RateReducer.h
|
|
3
|
+
*
|
|
4
|
+
* Pure-C IMU rate reducer — port of the strapdown coning/sculling algorithm
|
|
5
|
+
* in the legacy C++ RateReducer. Designed for integration into the
|
|
6
|
+
* DoorstepDropoffSDK sensor pipeline via SensorRateReducer.swift.
|
|
7
|
+
*
|
|
8
|
+
* Channel treatment:
|
|
9
|
+
* - rotationRate / rawGyro → coning-corrected integration (delta-angle)
|
|
10
|
+
* - accel / userAccel → sculling-corrected integration (delta-velocity)
|
|
11
|
+
* - gravity / roll,pitch,yaw → simple per-sample average over the epoch
|
|
12
|
+
* - mag / heading / proximity → latest-value pass-through
|
|
13
|
+
*
|
|
14
|
+
* NOT compiled into the Xcode target by default; add RateReducer.c to the
|
|
15
|
+
* framework target if you want to call these functions from Objective-C.
|
|
16
|
+
* The active Swift implementation in SensorRateReducer.swift mirrors this
|
|
17
|
+
* code exactly and requires no project-file changes.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
#pragma once
|
|
21
|
+
#include <stdbool.h>
|
|
22
|
+
|
|
23
|
+
#ifdef __cplusplus
|
|
24
|
+
extern "C" {
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
typedef struct { double x, y, z; } rr_vec3_t;
|
|
28
|
+
|
|
29
|
+
/** Flat sample type — mirrors the fields of InternalSensorData. */
|
|
30
|
+
typedef struct {
|
|
31
|
+
/* Inertial channels (coning/sculling-integrated, then rate-recovered) */
|
|
32
|
+
double rotation_rate_x, rotation_rate_y, rotation_rate_z;
|
|
33
|
+
double accel_x, accel_y, accel_z;
|
|
34
|
+
double raw_gyro_x, raw_gyro_y, raw_gyro_z;
|
|
35
|
+
double user_accel_x, user_accel_y, user_accel_z;
|
|
36
|
+
|
|
37
|
+
/* Averaged over the epoch */
|
|
38
|
+
double gravity_x, gravity_y, gravity_z;
|
|
39
|
+
double roll, pitch, yaw;
|
|
40
|
+
|
|
41
|
+
/* Latest-value pass-through */
|
|
42
|
+
double mag_x, mag_y, mag_z;
|
|
43
|
+
int mag_accuracy;
|
|
44
|
+
double raw_mag_x, raw_mag_y, raw_mag_z;
|
|
45
|
+
double heading;
|
|
46
|
+
int proximity_state; /* 0 = false, 1 = true */
|
|
47
|
+
|
|
48
|
+
/* Timing */
|
|
49
|
+
double timestamp; /* wall-clock timestamp of the epoch's last sample */
|
|
50
|
+
double delta_time; /* total epoch duration in seconds */
|
|
51
|
+
} rr_sample_t;
|
|
52
|
+
|
|
53
|
+
/** Per-pair integration state for one (gyro, accel) channel pair. */
|
|
54
|
+
typedef struct {
|
|
55
|
+
rr_vec3_t sum_delta_theta; /* accumulated angular increments */
|
|
56
|
+
rr_vec3_t prev_delta_theta; /* last sample's delta — NOT reset across epochs */
|
|
57
|
+
rr_vec3_t coning; /* coning correction accumulator */
|
|
58
|
+
|
|
59
|
+
rr_vec3_t sum_delta_vel; /* accumulated velocity increments */
|
|
60
|
+
rr_vec3_t prev_delta_vel; /* last sample's delta — NOT reset across epochs */
|
|
61
|
+
rr_vec3_t sculling; /* sculling correction accumulator */
|
|
62
|
+
} rr_pair_state_t;
|
|
63
|
+
|
|
64
|
+
/** Top-level rate-reducer state. Zero-initialise before calling rr_init(). */
|
|
65
|
+
typedef struct {
|
|
66
|
+
rr_pair_state_t primary; /* fusion gyro (rotationRate) + fusion accel */
|
|
67
|
+
rr_pair_state_t raw; /* raw gyro + raw accel (includes gravity) */
|
|
68
|
+
|
|
69
|
+
rr_vec3_t sum_gravity;
|
|
70
|
+
double sum_roll, sum_pitch, sum_yaw;
|
|
71
|
+
|
|
72
|
+
rr_sample_t latest; /* latest-value fields, refreshed every sample */
|
|
73
|
+
|
|
74
|
+
double sum_delta_time;
|
|
75
|
+
double prev_timestamp; /* 0.0 = not yet seen a sample */
|
|
76
|
+
double nominal_input_dt; /* 1/inputHz — fallback when timestamps are missing */
|
|
77
|
+
int count; /* samples accumulated in the current epoch */
|
|
78
|
+
int n; /* target samples per output epoch */
|
|
79
|
+
|
|
80
|
+
bool output_ready;
|
|
81
|
+
rr_sample_t output;
|
|
82
|
+
} rr_state_t;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Initialise the rate reducer.
|
|
86
|
+
*
|
|
87
|
+
* @param rr Pointer to a zero-initialised rr_state_t.
|
|
88
|
+
* @param input_hz Sensor input rate (e.g. 100.0).
|
|
89
|
+
* @param output_hz Desired output rate (e.g. 50.0).
|
|
90
|
+
* n = round(input_hz / output_hz), clamped to [2, 100].
|
|
91
|
+
*/
|
|
92
|
+
void rr_init(rr_state_t *rr, double input_hz, double output_hz);
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Feed one input sample.
|
|
96
|
+
*
|
|
97
|
+
* @return true when an output sample is ready; retrieve it with rr_get_output().
|
|
98
|
+
*/
|
|
99
|
+
bool rr_process(rr_state_t *rr, const rr_sample_t *sample);
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Retrieve the pending output sample.
|
|
103
|
+
*
|
|
104
|
+
* @return true if a sample was available; false if rr_process() has not yet
|
|
105
|
+
* returned true since the last retrieval.
|
|
106
|
+
*/
|
|
107
|
+
bool rr_get_output(rr_state_t *rr, rr_sample_t *out);
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Change the decimation factor at runtime.
|
|
111
|
+
* Epoch-in-progress is discarded; prev_delta_* state is preserved for continuity.
|
|
112
|
+
*/
|
|
113
|
+
void rr_set_n(rr_state_t *rr, int n);
|
|
114
|
+
|
|
115
|
+
#ifdef __cplusplus
|
|
116
|
+
}
|
|
117
|
+
#endif
|