@openpolicy/sdk 0.0.10 → 0.0.11
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/dist/index.d.ts +43 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
//#region ../core/dist/index.d.ts
|
|
2
2
|
type Jurisdiction = "us" | "eu" | "ca" | "au" | "nz" | "other";
|
|
3
|
+
type CompanyConfig = {
|
|
4
|
+
name: string;
|
|
5
|
+
legalName: string;
|
|
6
|
+
address: string;
|
|
7
|
+
contact: string;
|
|
8
|
+
};
|
|
3
9
|
type PrivacyPolicyConfig = {
|
|
4
10
|
effectiveDate: string;
|
|
5
|
-
company:
|
|
6
|
-
name: string;
|
|
7
|
-
legalName: string;
|
|
8
|
-
address: string;
|
|
9
|
-
contact: string;
|
|
10
|
-
};
|
|
11
|
+
company: CompanyConfig;
|
|
11
12
|
dataCollected: Record<string, string[]>;
|
|
12
13
|
legalBasis: string;
|
|
13
14
|
retention: Record<string, string>;
|
|
@@ -22,16 +23,15 @@ type PrivacyPolicyConfig = {
|
|
|
22
23
|
}[];
|
|
23
24
|
userRights: string[];
|
|
24
25
|
jurisdictions: Jurisdiction[];
|
|
26
|
+
children?: {
|
|
27
|
+
underAge: number;
|
|
28
|
+
noticeUrl?: string;
|
|
29
|
+
};
|
|
25
30
|
};
|
|
26
31
|
type DisputeResolutionMethod = "arbitration" | "litigation" | "mediation";
|
|
27
32
|
type TermsOfServiceConfig = {
|
|
28
33
|
effectiveDate: string;
|
|
29
|
-
company:
|
|
30
|
-
name: string;
|
|
31
|
-
legalName: string;
|
|
32
|
-
address: string;
|
|
33
|
-
contact: string;
|
|
34
|
-
};
|
|
34
|
+
company: CompanyConfig;
|
|
35
35
|
acceptance: {
|
|
36
36
|
methods: string[];
|
|
37
37
|
};
|
|
@@ -99,10 +99,40 @@ type TermsOfServiceConfig = {
|
|
|
99
99
|
};
|
|
100
100
|
privacyPolicyUrl?: string;
|
|
101
101
|
};
|
|
102
|
+
type CookiePolicyConfig = {
|
|
103
|
+
effectiveDate: string;
|
|
104
|
+
company: CompanyConfig;
|
|
105
|
+
cookies: {
|
|
106
|
+
essential: boolean;
|
|
107
|
+
analytics: boolean;
|
|
108
|
+
functional: boolean;
|
|
109
|
+
marketing: boolean;
|
|
110
|
+
};
|
|
111
|
+
thirdParties?: {
|
|
112
|
+
name: string;
|
|
113
|
+
purpose: string;
|
|
114
|
+
policyUrl?: string;
|
|
115
|
+
}[];
|
|
116
|
+
trackingTechnologies?: string[];
|
|
117
|
+
consentMechanism?: {
|
|
118
|
+
hasBanner: boolean;
|
|
119
|
+
hasPreferencePanel: boolean;
|
|
120
|
+
canWithdraw: boolean;
|
|
121
|
+
};
|
|
122
|
+
jurisdictions: Jurisdiction[];
|
|
123
|
+
};
|
|
124
|
+
type OpenPolicyConfig = {
|
|
125
|
+
company: CompanyConfig;
|
|
126
|
+
privacy?: Omit<PrivacyPolicyConfig, "company">;
|
|
127
|
+
terms?: Omit<TermsOfServiceConfig, "company">;
|
|
128
|
+
cookie?: Omit<CookiePolicyConfig, "company">;
|
|
129
|
+
};
|
|
102
130
|
//#endregion
|
|
103
131
|
//#region src/index.d.ts
|
|
132
|
+
declare function defineConfig(config: OpenPolicyConfig): OpenPolicyConfig;
|
|
104
133
|
declare function definePrivacyPolicy(config: PrivacyPolicyConfig): PrivacyPolicyConfig;
|
|
105
134
|
declare function defineTermsOfService(config: TermsOfServiceConfig): TermsOfServiceConfig;
|
|
135
|
+
declare function defineCookiePolicy(config: CookiePolicyConfig): CookiePolicyConfig;
|
|
106
136
|
//#endregion
|
|
107
|
-
export { type PrivacyPolicyConfig, type TermsOfServiceConfig, definePrivacyPolicy, defineTermsOfService };
|
|
137
|
+
export { type CookiePolicyConfig, type OpenPolicyConfig, type PrivacyPolicyConfig, type TermsOfServiceConfig, defineConfig, defineCookiePolicy, definePrivacyPolicy, defineTermsOfService };
|
|
108
138
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["OutputFormat","CompileOptions","formats","PolicySection","id","title","body","Jurisdiction","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["OutputFormat","CompileOptions","formats","PolicySection","id","title","body","Jurisdiction","CompanyConfig","name","legalName","address","contact","PrivacyPolicyConfig","Record","effectiveDate","company","dataCollected","legalBasis","retention","cookies","essential","analytics","marketing","thirdParties","purpose","userRights","jurisdictions","children","underAge","noticeUrl","DisputeResolutionMethod","TermsOfServiceConfig","acceptance","methods","eligibility","minimumAge","jurisdictionRestrictions","accounts","registrationRequired","userResponsibleForCredentials","companyCanTerminate","prohibitedUses","userContent","usersOwnContent","licenseGrantedToCompany","licenseDescription","companyCanRemoveContent","intellectualProperty","companyOwnsService","usersMayNotCopy","payments","hasPaidFeatures","refundPolicy","priceChangesNotice","availability","noUptimeGuarantee","maintenanceWindows","termination","userCanTerminate","effectOfTermination","disclaimers","serviceProvidedAsIs","noWarranties","limitationOfLiability","excludesIndirectDamages","liabilityCap","indemnification","userIndemnifiesCompany","scope","thirdPartyServices","disputeResolution","method","venue","classActionWaiver","governingLaw","jurisdiction","changesPolicy","noticeMethod","noticePeriodDays","privacyPolicyUrl","CookiePolicyConfig","functional","policyUrl","trackingTechnologies","consentMechanism","hasBanner","hasPreferencePanel","canWithdraw","PolicyInput","type","OpenPolicyConfig","Omit","privacy","terms","cookie","isOpenPolicyConfig","value","ValidationIssue","level","message","compileCookiePolicy","config","options","format","content","sections","compilePrivacyPolicy","compileTermsOfService","validatePrivacyPolicy","validateCookiePolicy","validateTermsOfService","expandOpenPolicyConfig","compilePolicy","input"],"sources":["../../core/dist/index.d.ts","../src/index.ts"],"mappings":";KAUKO,YAAAA;AAAAA,KACAC,aAAAA;EACHC,I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EAEFC,YAAAA;IACEC,YAAAA;EAAAA;EAEFC,aAAAA;IACEC,YAAAA;IACAC,gBAAAA;EAAAA;EAEFC,gBAAAA;AAAAA;AAAAA,KAEGC,kBAAAA;EACHlE,aAAAA;EACAC,OAAAA,EAASR,aAAAA;EACTY,OAAAA;IACEC,SAAAA;IACAC,SAAAA;IACA4D,UAAAA;IACA3D,SAAAA;EAAAA;EAEFC,YAAAA;IACEf,IAAAA;IACAgB,OAAAA;IACA0D,SAAAA;EAAAA;EAEFC,oBAAAA;EACAC,gBAAAA;IACEC,SAAAA;IACAC,kBAAAA;IACAC,WAAAA;EAAAA;EAEF7D,aAAAA,EAAepB,YAAAA;AAAAA;AAAAA,KASZoF,gBAAAA;EACH3E,OAAAA,EAASR,aAAAA;EACTqF,OAAAA,GAAUD,IAAAA,CAAK/E,mBAAAA;EACfiF,KAAAA,GAAQF,IAAAA,CAAK5D,oBAAAA;EACb+D,MAAAA,GAASH,IAAAA,CAAKX,kBAAAA;AAAAA;;;iBCjIA,YAAA,CAAa,MAAA,EAAQ,gBAAA,GAAmB,gBAAA;AAAA,iBAIxC,mBAAA,CACf,MAAA,EAAQ,mBAAA,GACN,mBAAA;AAAA,iBAIa,oBAAA,CACf,MAAA,EAAQ,oBAAA,GACN,oBAAA;AAAA,iBAIa,kBAAA,CACf,MAAA,EAAQ,kBAAA,GACN,kBAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
//#region src/index.ts
|
|
2
|
+
function defineConfig(config) {
|
|
3
|
+
return config;
|
|
4
|
+
}
|
|
2
5
|
function definePrivacyPolicy(config) {
|
|
3
6
|
return config;
|
|
4
7
|
}
|
|
5
8
|
function defineTermsOfService(config) {
|
|
6
9
|
return config;
|
|
7
10
|
}
|
|
11
|
+
function defineCookiePolicy(config) {
|
|
12
|
+
return config;
|
|
13
|
+
}
|
|
8
14
|
//#endregion
|
|
9
|
-
export { definePrivacyPolicy, defineTermsOfService };
|
|
15
|
+
export { defineConfig, defineCookiePolicy, definePrivacyPolicy, defineTermsOfService };
|
|
10
16
|
|
|
11
17
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type {\n\tPrivacyPolicyConfig,\n\tTermsOfServiceConfig,\n} from \"@openpolicy/core\";\n\nexport type {\n\tPrivacyPolicyConfig,\n\tTermsOfServiceConfig,\n} from \"@openpolicy/core\";\n\nexport function definePrivacyPolicy(\n\tconfig: PrivacyPolicyConfig,\n): PrivacyPolicyConfig {\n\treturn config;\n}\n\nexport function defineTermsOfService(\n\tconfig: TermsOfServiceConfig,\n): TermsOfServiceConfig {\n\treturn config;\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type {\n\tCookiePolicyConfig,\n\tOpenPolicyConfig,\n\tPrivacyPolicyConfig,\n\tTermsOfServiceConfig,\n} from \"@openpolicy/core\";\n\nexport type {\n\tCookiePolicyConfig,\n\tOpenPolicyConfig,\n\tPrivacyPolicyConfig,\n\tTermsOfServiceConfig,\n} from \"@openpolicy/core\";\n\nexport function defineConfig(config: OpenPolicyConfig): OpenPolicyConfig {\n\treturn config;\n}\n\nexport function definePrivacyPolicy(\n\tconfig: PrivacyPolicyConfig,\n): PrivacyPolicyConfig {\n\treturn config;\n}\n\nexport function defineTermsOfService(\n\tconfig: TermsOfServiceConfig,\n): TermsOfServiceConfig {\n\treturn config;\n}\n\nexport function defineCookiePolicy(\n\tconfig: CookiePolicyConfig,\n): CookiePolicyConfig {\n\treturn config;\n}\n"],"mappings":";AAcA,SAAgB,aAAa,QAA4C;AACxE,QAAO;;AAGR,SAAgB,oBACf,QACsB;AACtB,QAAO;;AAGR,SAAgB,qBACf,QACuB;AACvB,QAAO;;AAGR,SAAgB,mBACf,QACqB;AACrB,QAAO"}
|